Jump to content
  • Advertisement
Sign in to follow this  
slicer4ever

OpenGL do luminance texture's still exist to openGL?

This topic is 2154 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

so, i'm working on some texture code, and trying to expand it to support all possible texture formats that openGL supports, i'm using the glTexImage* family of functions to determine what openGL supports

http://www.opengl.org/sdk/docs/man/xhtml/glTexImage1D.xml
http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml
http://www.opengl.org/sdk/docs/man/xhtml/glTexImage3D.xml

their's a single mention of luminance in the 3D pages, which isn't helpful.

so, in short, if it's not in the docs, should i ignore the type(i've used it in the past, and am faily certain it was in older documentation.)?

or are the docs just incomplete?

Share this post


Link to post
Share on other sites
Advertisement
The formats GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA and GL_INTENSITY have been deprecated, but there are still one and two channel formats but with new names. The new names are GL_RED and GL_RG to denote one and two channel texture data.

The old names implied a usage (GL_ALPHA for an alpha texture, for example) and there were multiple formats with a single color channel, but had different behavior when it came to what four channel color value was returned from sampling a one or two channel format. For example, a luminance value of L returned the RGBA value (L, L, L, 1), while an intensity value I returned the RGBA value (I, I, I, I). It made a difference for the fixed functions which were not programmable and you had to select the precise format such that, for example, the alpha channel became correct. Now when we have fully programmable shaders, it makes sense to disconnect the name of the format with the actual usage which is entirely arbitrary within your shader.

Now you effectively only specify how many color channels you want with GL_RED, GL_RG, GL_RGB and GL_RGBA, and, of course, variants thereof to narrow in on exact channel format and precision.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!