I need to use a 2 float16 components texture for FBO rendering, but I’m a bit puzzled with what format to choose:
-LUMINANCE_ALPHA_FLOAT16 works well on all ATI/NVIDIA on Windows, but doesn’t work with FBO on Mac OS X (and it is not supposed to be supported by EXT FBO)
-RG16F would be the standard, but it doesn’t exist on older ATI/NVIDIA GPUs (prior to HDxxxx/NV80) except for ATI on Mac OS X
-FLOAT_RG16 works with all NVIDIA, but I don’t think it exists on Mac OS X, and I doubt ATI support it.
Any suggestion ?
You either need GL 3.0, but I think Mac osx is still at 2.1.
Or a NV only extension like http://www.opengl.org/registry/specs/NV/float_buffer.txt
Or the half float extension
I’m not sure but I think there is a EXT version of that extension.
As I already told you in another topic (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=286564&page=2), I suggest you to dynamically choose between the texture formats based on what extension is supported (GL_NV_float_buffer, GL_ATI_texture_float or GL_ARB_texture_rg). Or stick to RG16F if you target only SM4.0+ hardware.
Sounds like he is not checking what extension is supported and he is just trying different things. That’s not a good idea.
ALWAYS check the GL version to make sure it is above your programs requirement.
Since certain things are not in core GL 2.1, you have to check for extensions.
GL_EXT_framebuffer_object only defines functions for making an FBO. It doesn’t introduce storage formats.