Chrome and Firefox both report GL_STENCIL_BITS of 0, despite supporting depth_texture with combined depth-stencil. That makes it impossible to tell from IE WebGL, which still doesn't support stencil (and also reports 0). Also passing GL_DEPTH_STENCIL to create, and passing that to GL_DEPTH_STENCIL_ATTACHMENT results in a invalid FBO. Getting texture and depth formats correct should be part of the validation suite? This is a pretty fundamental requirement to use a GPU.
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
D32 might not actually be D32, query depth bits for that. Stencil bits should be non-zero for depth stencil, I should think.
It's supposed to reflect capability to use Stencil (0 or 8), and not the current stencil bits of an FBO.
--
Thanks Shannon for the spec reference. The spec says that when an FBO is not bound, then the results are implementation dependent. I'm saying that aspect of WebGL does not appear to match what native OpenGL does (returning max bits for each BITS request).
On ES, I thought there is always a default FBO, where on OpenGL one must be explicitly bound.
It turns out that a default Depth (and no Stencil) was begin allocated, so that's what was being reflected back in those bits. It's good because I can fix that, and save a full depth buffer. On ES, I thought there is always a default FBO, where on OpenGL one must be explicitly bound. That may be why these quantities differ between Mac and WebGL impls.I wouldn't assume that's what native OpenGL is doing. If you're querying DEPTH_BITS and STENCIL_BITS on the default framebuffer, the values returned are likely the depths of those channels in the default framebuffer. Likewise, if you're querying the default framebuffer in WebGL, you're probably getting the actual bit depth of the default framebuffer. (Assuming these queries are passed through to the underlying ES implementation as is, that is definitely what you are getting on at least one implementation.)
--