View Full Version : how to use indexed color in OpenGL?
09-12-2000, 07:40 PM
Because of video memory limitation, I want to try to use indexed color format in glTexImage2D, instead of RGBA format. But how can I specify a CLUT ? (color looking-up table) I found APIs like glPixelMap, but they seem can't fit my need.
Anyone who would help me? Thank you.
09-12-2000, 11:54 PM
I am not sure on this because I don't use it, but there is GL_COLOR_INDEX. I think you have a defined CLUT when you have a GL rendering context that you either get form GLX or WGL functions. Your GL driver should take your image data and when rendering use the current CLUT. If that does not work, maybe you have to append the CLUT to the image data, but that does not make any sense because you should only have one palette for the entire application. That is why I believe it is defined by your GL rendering context.
I hope that helps,
09-15-2000, 07:04 AM
The 'red book' describes how to use color index mode.
A word of warning though, not many graphics cards support it anymore...
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.