When I do the following for 8 bit indexed texture lookup table, it works fine. However, when I changed it to 16 bits, the texture does not display correctly to the screen. All I get is a black screen. Here is my code for 16bit. What am I doing wrong? Thanks.
unsigned char colormap[65536*3] ;
glColorTable(GL_SHARED_TEXTURE_PALETTE_EXT, GL_RGB, 65536, GL_RGB, GL_UNSIGNED_BYTE, colormap) ;
glEnable(GL_SHARED_TEXTURE_PALETTE_EXT);
glTexImage2D(GL_TEXTURE_2D, 0, GL_COLOR_INDEX16_EXT, x, y, 0, GL_COLOR_INDEX, GL_UNSIGNED_SHORT, index ) ;