Be careful using opengl.org for documentation because it is not without its flaws. For example, the 3.3 pages refer to a set of tables of valid internal formats but fails to include the tables. For the record, the 1.1 specification for glTexImage2d did not use "magic" numbers since the literal values 1,2,3, and 4 actually referred to the number of components as indicated in the argument's description. For historical reference these values mapped to the following internal base formats:
1 = GL_LUMINANCE
2 = GL_LUMINANCE_ALPHA
3 = GL_RGB
4 = GL_RGBA
I really can't understand why the GL_LUMINANCE & GL_ALPHA formats were dropped from the specification considering these have been retained in the OpenGLES 1/2/3 specifications. There was absolutely no technical reason to do this considering the internal conversion is trivial.



Reply With Quote

