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

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



On Tue, Apr 17, 2012 at 7:07 AM, Cedric Vivier <cvivier@mozilla.com> wrote:
>
> On Tue, Apr 17, 2012 at 05:45, Jeff Gilbert <jgilbert@mozilla.com> wrote:
>> This demo which works 'correctly' in Chrome does not work in Firefox:
>> http://www.playtankworld.com/demo/stencil_shadows
>>
>> This is because the author does not request a stencil buffer at context creation. In the absence of a selection, the context creation hint 'stencil' defaults to false. However, 'antialias', 'depth', and 'stencil' are non-binding hints. That is, a compliant implementation can ignore them.
>>
>> While this is necessary for when such buffers are not available, it is also allowable to always supply such buffers, even when they are (implicitly or explicitly) not requested.
>
> I don't think the Chrome behavior is acceptable.
> Sure, the WebGL implementation is indeed allowed to create an
> underlying (GL/D3D/...) context with a stencil buffer by default, and
> the WebGL implementation can ignore the request to create a context
> with stencil buffer (thus returning a context without it).
>
> On the other hand, when a stencil buffer has not been explicitly
> requested, the stencil buffer should not be manipulatable from the
> WebGL context (ie. "If the value is false, no stencil buffer is
> available." as written in the spec), regardless of its actual presence
> or not in the underlying context.
>
> Regards,

I think the "value" is the value from getContextAttributes(), not the
supplied value in getContext.

Therefore, chrome's behavior is still correct as far as the current
spec is concerned.

I agree with the proposed change the spec though.

>
> -----------------------------------------------------------
> 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
> -----------------------------------------------------------
>

-----------------------------------------------------------
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
-----------------------------------------------------------