Skip to main content
GameDev.net gamedev.net
🔒 Locked

Textures

Started by veredz Apr 16, 2001 at 3:10 PM 0 replies 400+ views
Original Post
veredz
veredz
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.