On Fri, Jun 1, 2012 at 3:49 PM, Gregg Tavares (çç) <email@example.com>
ÂI think this means the spec should be more clear. Instead of saying "but only if the drawing buffer has been modified since the last compositing operation" it should be specific and say "Âbut only if clear, drawArrays or drawElements have been called since the last compositing operation".
It would be more concrete to say:
"WebGL presents its drawing buffer to the HTML page compositor immediately before a compositing operation if the drawing bufferÂdirtyÂflag is set.Â After presentation, the drawing buffer dirtyÂflag is cleared, and if the the preserveDrawingBuffer attribute in the context's actual context parameters is false, the contents of the backbuffer are cleared to their default values."
and add "Each WebGLRenderingContext has a drawing buffer dirty flag, which is initially set." to 2.1, and "Set the context's drawing buffer dirty flag." to the clear, drawArrays and drawElements definitions.
This makes the state of whether the backbuffer should be recomposited, and whether it should be cleared, an explicit piece of state.
This could be made *closer* to testable by adding eg. getParameter(CONTEXT_DIRTY), which returns the value of the dirty flag.Â This wouldn't actually test whether the compositing and clearing behaviour is really working correctly, but it'd sort of get halfway there.Â I doubt there are any use cases for this other than testing, though, so it's probably not worth it.