PDA

View Full Version : internal format in glTexImage*()



sguTiger
06-28-2009, 05:33 PM
Hello,
I am not clear about the role of the internel format in glTexImage*(); The format and the data type specifies the array we feed the function. Does the internel format specify how the data are stored in the texure memory. If the format are specified to be GL_RGBA, and the internel format are specified to be GL_LUMINANCE. Will GL transform the RGBA values to luminance values? Thank you.

ZbuffeR
06-29-2009, 02:35 AM
Yes it will.
From the man page http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml :


If an application wants to store the texture at a certain
resolution or in a certain format, it can request the resolution
and format with internalFormat. The GL will choose an internal
representation that closely approximates that requested by internalFormat, but
it may not match exactly.

Dark Photon
06-29-2009, 07:09 AM
Does the internel format specify how the data are stored in the texure memory.
Yes.