On Tue, Jan 24, 2012 at 3:20 PM, Florian BÃsch <firstname.lastname@example.org>
With target TEXTURE_CUBE_MAP it should be possible in OpenGL ES 2.0 and OpenGL but not in Direct 3D 9. To address this issue we can seek these remedies:
1) We exclude TEXTURE_CUBE_MAP from accepting calls with the texture2D entry point, effectively excluding depth cubemap support
2) We could split the extension into two parts (for TEXTURE_2D and TEXTURE_CUBE_MAP)
3) We perform the check of support at validation time of the FBO which would fail on Direct3D 9 for TEXTURE_CUBE_MAP
I personally prefer option 3, because it leaves it open to use depth cubemaps on implementations that support them, and FBO validation has to happen anyway.
I think use of FRAMEBUFFER_UNSUPPORTED should be minimized as much as possible. ÂIt's very hard for developers to deal with meaningfully, since it tells you nothing about what part of the FBO configuration it can't handle, or what to change to make the implementation happy.
I'd prefer that error be used only as an escape hatch for uncommon issues, and avoided for common issues that are known in advance. ÂIt's better to define the availability and FBO support more strictly; if the relevant extension is available at all, it should be a strong indication that it's fully supported and unlikely to mysteriously fail with FB_UNSUPP. ÂIt looks like option #2 is best for this.