do luminance texture's still exist to openGL?

Started by
1 comment, last by slicer4ever 11 years, 5 months ago
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?
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.
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.
thanks mate, that was the exact explanation i was looking for=-)
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

This topic is closed to new replies.

Advertisement