[Public WebGL] Non-binding context creation attributes, specifically 'stencil'

Kenneth Russell [email protected]
Fri Apr 27 19:30:53 PDT 2012

On Tue, Apr 17, 2012 at 7:23 PM, Mark Callow <[email protected]> wrote:
> On 17/04/2012 23:07, Cedric Vivier wrote:
> I don't think the Chrome behavior is acceptable.
> ... (ie. "If the value is false, no stencil buffer is
> available." as written in the spec)...
> +1
> Seem's we need a conformance test for this.
> I can no longer recall why we made the attributes non-binding, except for
> anti-alias, which is not available in all OpenGL ES 2.0 implementations.

I'm currently investigating this. Here are the results so far:

History: there was a supposition that some combinations of depth and
stencil may not be supported by certain hardware; for example,
requesting a stencil buffer but no depth buffer. Further, there was a
supposition that it would be difficult to emulate the behavior that
one or the other buffer was missing, if under the hood, the buffer was
actually allocated.

However, in light of the current situation I agree that it's bad for
compatibility that depth and stencil are non-binding. Jeff, I agree
with you that the spec should be changed so that if depth or stencil
are false, that the context acts as though those buffers aren't
present, even if they are allocated under the hood. It doesn't *seem*
to be that difficult to emulate the absence of a depth or stencil

Is there agreement that the spec should be updated in this manner? If
so, I'll make this change.

Here's the interesting part: Chrome, like Firefox, attempts to act as
though there is no stencil buffer if the context is allocated with
{stencil:false}. However, something is going wrong in this emulation.
The conformance test
context/context-attributes-alpha-depth-stencil-antialias.html attempts
to verify this behavior, but isn't catching the problem that the demo
exposes. I'll continue to investigate why the demo slips by this
emulation and update the conformance test to catch the bug.


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