GL_RGB32F or GL_LUMINANCE32F_ARB?

Hi guys,

A quick question: GL_RGB32F and GL_LUMINANCE32F_ARB both work fine as an internal format for a floating-point gray-scale texture. Which one is preferable to use?

Both of the following work:


glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB32F ,  _width, height, 0, GL_RED, GL_FLOAT, rangemapdata);


glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE32F_ARB,  width, height, 0, GL_RED, GL_FLOAT, rangemapdata);

I heard GL_LUMINANCE is deprecated. Is it deprecated as an internal format or in general? Any memory-requirement differences between the two?

Well, RGB32F is >= 12 bytes/texel whereas LUMINANCE32F is >= 4 bytes/texel. Given a choice, I’ll take the 4 :stuck_out_tongue:

GL_R32F_ARB is a replacement for GL_LUMINANCE32F_ARB. It is almost the same. With GL_R32F_ARB you can render to texture using FBO.

Aha! Thats what I was looking for. Thanks guys!