prombot
05-11-2001, 04:57 AM
I know there has been some discussion about this before, but it hasn't seemed to help me.
I'm trying to use paletted textures (duh). I get black polygons instead of what I should get. Its not my colormap because I tried memset the whole thing to white.. No luck.
I _am_ using glColorTable not glColorTableEXT on 1.2 drivers. In fact EXT_paletted_texture isn't even supported in this driver (ARB_imaging however is).
Reading the documentation I am a little confused what I can pass into glColorTable, maybe someone can clear it up (this is probably my problem).
I call it like this:
glColorTable (GL_COLOR_TABLE, 4, 256, GL_RGBA, GL_UNSIGNED_BYTE, colormap);
Checking for an error yields that the width of the colormap is 0 (which happens when glColorTable fails). I get an invalid enum error. I've tried using GL_RGBA in place of the '4', and it doesn't error but I still get blackness where there should be rich and wonderful color.
Further error checking shows that my glTexImage2d (GL_TEXTURE_2D, 0, 1, width, height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, data); works fine as well.
Does anyone have a clue what I'm doing wrong?
P.S. I guess I should mention I retrieve the glColorTable entry point with a call to wglGetProcAddress ("glColorTable"); because Microsoft doesn't export it from their .dll (and rightly so as its a 1.1 .dll).
I'm trying to use paletted textures (duh). I get black polygons instead of what I should get. Its not my colormap because I tried memset the whole thing to white.. No luck.
I _am_ using glColorTable not glColorTableEXT on 1.2 drivers. In fact EXT_paletted_texture isn't even supported in this driver (ARB_imaging however is).
Reading the documentation I am a little confused what I can pass into glColorTable, maybe someone can clear it up (this is probably my problem).
I call it like this:
glColorTable (GL_COLOR_TABLE, 4, 256, GL_RGBA, GL_UNSIGNED_BYTE, colormap);
Checking for an error yields that the width of the colormap is 0 (which happens when glColorTable fails). I get an invalid enum error. I've tried using GL_RGBA in place of the '4', and it doesn't error but I still get blackness where there should be rich and wonderful color.
Further error checking shows that my glTexImage2d (GL_TEXTURE_2D, 0, 1, width, height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, data); works fine as well.
Does anyone have a clue what I'm doing wrong?
P.S. I guess I should mention I retrieve the glColorTable entry point with a call to wglGetProcAddress ("glColorTable"); because Microsoft doesn't export it from their .dll (and rightly so as its a 1.1 .dll).