[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Requiring certain combinations for framebuffer attachments to work in WebGL
On Thu, Jun 14, 2012 at 4:00 PM, Gregg Tavares (社用) <firstname.lastname@example.org>
OpenGL ES 2.0 only requires 1 combination of framebuffer attachments to work. In other words, it can fail to allow rendering to an GL_RGBA4 renderbuffer as well as a GL_RGBA/UNSIGNED_BYTE texture as long as it say allows rendering to a GL_ALPHA/UNSIGNED_BYTE texture.
This makes it really hard to write conformance tests for FBOs because there's no guarantee that any specific format will work alone nor any 2 or more formats will work together.
So for example, it turns out, Chrome was not allowing DEPTH_STENCIL + COLOR attachments and the conformance tests was not able to point this out since by the spec that combination might not work on some platforms and so the test has to pass.
The spec requires that it's possible to create a DEPTH_STENCIL and that it's possible to attach it but the spec does NOT require that you have to be able to render do it or be able use it with any other attachments.
What if any platforms would break if we required certain combinations to work? Specifically
COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture
COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture + DEPTH_ATTACHMENT = DEPTH_COMPONENT16 renderbuffer
COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture + DEPTH_STENCIL_ATTACHMENT = DEPTH_STENCIL renderbuffer
I think at least the first combinations should be required. Maybe requiring 2 or 3 but not both?
Anything else would be left optional but these 3 combinations would be required.