GL_EXT_paletted_texture

Hello i am trying to use GL_EXT_paletted_texture…
of course i can’t understand the problem

here’s my sequence:

glPixelStorei(GL_UNPACK_ALIGNMENT,1);
glGenTextures(1,&texName);

glBindTexture(GL_TEXTURE_2D,texName);

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S, tilingStates[pBitmap->u]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T, tilingStates[pBitmap->v]);

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, filteringStates[pBitmap->mag]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, filteringStates[pBitmap->min]);

		glColorTableEXT(GL_TEXTURE_2D,GL_COLOR_INDEX8_EXT,256,3,GL_UNSIGNED_BYTE,pic->Infos.pPalette);

		glTexImage2D(GL_PROXY_TEXTURE_2D,0,GL_COLOR_INDEX,w,h,0,1,GL_UNSIGNED_BYTE,pic->Infos.pData);

Any idea??? Anyway i haven’t found any samples @Nvidia concerning paletted textures… where can i find some??

thanks…

What happens?

My tga loader can use paletted textures: http://home.clara.net/paulyg/ogl.htm

OK thanks Paul… the right sequence is:

		glColorTableEXT(GL_TEXTURE_2D,GL_RGB,256,GL_RGB,GL_UNSIGNED_BYTE,pic->Infos.pPalette);
					glTexImage2D(GL_TEXTURE_2D,0,GL_COLOR_INDEX8_EXT,w,h,0,GL_COLOR_INDEX,GL_UNSIGNED_BYTE,pic->Infos.pData);

bye