Original Post
We tried lesson06 of the OpenGL tutorial with a BMP of 256X256X256 (8 bits / pixel). It worked fine.
But when we tried to work in COLOR_INDEX, build a look up table and load the texture with:
glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX, 256, 256, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, &Buffer);
The texure was not displayed.
We also tried to display the chess image from the "Red book" in COLOR_INDEX but with no success.
When we tried simple graphics in COLOR_INDEX (no textures) it worked fine.
Do you have any sample that loads and displays texture with COLOR_INDEX and not RGB ?
The reason we insist on GL_COLOR_INDEX is memory consumption. Our input is BMP\RAW
files with 256 colors per pixel (gray scale). So there is no reason to work in RGBA.
Is there a way to load textures with GL_COLOR_INDEX ?
Thank you in advance for your reply.
If you need further details, please let us know.