[Public WebGL] Optimization or bug?

Kenneth Russell [email protected]
Wed May 11 19:21:19 PDT 2011


On Tue, May 10, 2011 at 8:58 PM, Mark Callow <[email protected]> wrote:
> We have discovered an interesting edge case regarding clearing of the
> drawing buffer after presentation when preserveDrawingBuffer is false where
> the implementations have different behaviour. A simple test program is
> attached.
>
> The test program clears only the color channels; the alpha channel is
> masked. Both Chrome & Safari clear the alpha channel to zero as required by
> the specification. Firefox 4 does not. On the systems I have tested so far,
> the initial value set by of 1.0 set when the test starts, remains in the
> alpha channel. Most likely the underlying GL implementations I've been able
> to test with preserve the drawing buffer across swap giving this result.
>
> But is this a bug in Firefox or a smart optimization? One could argue that
> if the WebGL implementation knows that the GL is preserving the buffer
> contents and the application has cleared the channel at least once, no
> further action is necessary to preserve security. What do the list members
> think?
>
> By the way, the spec language needs a small tweak. Section 2.2 says
>
> "The table below also shows the value to which these buffers shall be
> cleared when first created or when the size is changed."
>
> It needs to say
>
> "... when first created, when the size is changed or after presentation when
> preserveDrawingBuffer is false."

Good catch; I've applied this change to the editor's draft.

-Ken

> Regards
>
> -Mark
>
>
>
-----------------------------------------------------------
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------




More information about the public_webgl mailing list