[Public WebGL] WebGL back buffer contents
Tue Jan 26 16:45:54 PST 2010
On Jan 26, 2010, at 3:37 PM, Oliver Hunt wrote:
> On Jan 26, 2010, at 3:28 PM, Chris Marrin wrote:
>> On Jan 26, 2010, at 10:00 AM, Vangelis Kokkevis wrote:
>>> I think we should settle on having the contents of the WebGL drawing
>>> buffer be persistent, like the 2D context. Having a completely new
>>> back buffer potentially swapped in unexpectedly will be too surprising
>>> to the programmer.
>>> I like that idea although I'm not sure how we would handle resizing of drawing surface. What's the expectation then?
>> Here is what the Canvas element says:
>> When the canvas element is created, and subsequently whenever the width and height attributes are
>> set (whether to a new value or to the previous value), the bitmap and any associated contexts must
>> be cleared back to their initial state and reinitialized with the newly specified coordinate space
>> When the canvas is initialized, its bitmap must be cleared to transparent black.
>> That seems like an appropriate definition for us.
> My only concern with this exact definition is that the 2d canvas is completely reset - all state is clobbered, applying the same logic to webgl would imply that all shaders, etc would be unloaded as well, which seems a little extreme.
Yeah, I didn't fully read the "and any associated contexts" part. I think that in the past we agreed that we should not even mess with the viewport coordinates on a size change. So perhaps better wording would be:
When the canvas element is created, and subsequently whenever the width and height attributes are
set (whether to a new value or to the previous value), the bitmap must be cleared to transparent black.
Furthermore upon creation of the context its initial state shall be as described in the OpenGL ES 2.0
Setting the width and height attributes after initialization shall not change the context state.
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