[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] inconsistent clear behavior for preserveDrawingBuffer: false (the default)



On Fri, Jun 1, 2012 at 3:54 PM, Glenn Maynard <glenn@zewt.org> wrote:
> On Fri, Jun 1, 2012 at 3:49 PM, Gregg Tavares (çç) <gman@google.com> wrote:
>>
>> Â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.

Thanks for the suggestion. Section 2.2 "The Drawing Buffer" needs a
larger reworking, as has been discussed on this list previously. Given
that, Gregg's smaller changes seem to fit in better with the current
text. Gregg, I've incorporated them basically verbatim; all, please
review and comment.

Any contributions restructuring Section 2.2 to be more algorithmic
would be appreciated.

-Ken

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------