[Public WebGL] WebGL back buffer contents

Chris Marrin [email protected]
Wed Jan 27 11:57:09 PST 2010


On Jan 27, 2010, at 9:51 AM, Gregg Tavares wrote:

> 
> 
> ...Rendering directly to the canvas is probably the most common case, and having that "just work" without special handling would IMO be better and probably cause less confusion in total. As long as it is documented that the viewport will change on resize I don't think it will be such a big problem. The 2d context clears all state on a resize and that has not cause so much problem.
> 
> I'm getting lost. If the canvas can not be resized except by user code then why does the viewport need to automatically be updated?  I could see an argument if the browser could magically resize the back buffer but it can't. I just want to make sure the 2 resize cases are not getting confused.

I agree. There's no reason to fiddle with the viewport implicitly, especially since the author may not have set the viewport to match the window (for instance, to maintain aspect ratio or render to a subview). I think we should leave it alone.

A "size changed" event might not be a bad idea though. It would make it a bit easier to separate the code that changes the size from the code that has to respond and rerender the change. Not essential, but perhaps useful.

-----
~Chris
[email protected]




-----------------------------------------------------------
You are currently subscribe to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:




More information about the public_webgl mailing list