Jump to content

  • Log In with Google      Sign In   
  • Create Account


do luminance texture's still exist to openGL?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 slicer4ever   Crossbones+   -  Reputation: 3415

Like
0Likes
Like

Posted 24 November 2012 - 05:08 PM

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.

Sponsor:

#2 Brother Bob   Moderators   -  Reputation: 7907

Like
4Likes
Like

Posted 24 November 2012 - 05:42 PM

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.

#3 slicer4ever   Crossbones+   -  Reputation: 3415

Like
0Likes
Like

Posted 24 November 2012 - 05:46 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS