[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Non-binding context creation attributes, specifically 'stencil'
On Mon, Apr 16, 2012 at 10:45 PM, Jeff Gilbert <firstname.lastname@example.org>
This implementation-defined behavior causes the above demo to render as intended in Chrome, but fails to do so in Firefox. If we were to have a strict or adverse reference renderer, this demo would also fail to consistently render as intended there. Since the two implementations are (in as far as this demo is concerned) spec-compliant, I believe this is a spec issue.
I don't agree that this is inherently a bug in the spec. It's by design--as the cost of supporting hardware of varying capabilities--that it's possible for an application to function on one spec-compliant implementation and not on another.
(That's not to say we shouldn't do this, of course.)
I move that we require any (implicit or explicit) negative requests for 'antialias', 'depth', and 'stencil' to guarantee they will not be supplied with that respective buffer type, similar to 'alpha'. Because 'stencil' defaults to false, this means that in the absence of a positive request for a stencil buffer, the context will not receive one.
I do agree with this. These are
hints is because some hardware may not support all rendering features (or all combinations of features). It seems unlikely that a GPU would
fail to support *not* using one of these features, so there should be no
reason to allow implementations to ignore a false value in the context
creation options. (In other words, while some hardware may not be able
to satisfy a "true" request, they should always be able to satisfy
"false".) Doing so pays the cost of decreased interop without any improvement to hardware
I'm not sure if this is necessarily possible with "antialias", however. nVidia drivers allow users to force antialiasing on globally, so browsers may be unable to disable it. I'm not sure, though; this may only apply to rendering to display buffers and not when rendering to offscreen buffers. (If you're using WebGL to do math rather than render graphics, you may really want to force antialiasing off...)