[Public WebGL] Optimization or bug?

Benoit Jacob [email protected]
Wed May 11 05:00:28 PDT 2011



----- Original Message -----




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. The preserveDrawingBuffer semantics are not implemented in Firefox 4. There is a patch series pending review on our bugzilla: 
https://bugzilla.mozilla.org/show_bug.cgi?id=636913 
This should enter Nightly very soon and eventually Firefox 6. 





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? 
As far as I can see, we don't make any assumption about what channels in the buffer the GL implementation may preserve. 

Benoit 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20110511/e75912ac/attachment.html>


More information about the public_webgl mailing list