bmcclint
08-14-2001, 07:21 AM
HELP...I am lost...I am trying to figure out if I can use 16bit texture with OpenGL. Everything I read says I can but I am getting no where.
I have texture mapping working but I have to convert all the textures to 24bit(888) format using GL_RGB/GL_UNSIGNED_BYTE as paramters and this all works well.
glTexImage2D(GL_TEXTURE_2D,
0, /* Number of MipMap Levels */
3, /* Blending components */
GL_Texture->x, /* Texture Dimentions */
GL_Texture->y,
0, /* Border Width */
GL_RGB, /* GL_RGB, GL_RGBA, etc... pg. 265 */
GL_UNSIGNED_BYTE, /* Bytes per pixel format */
&GL_Texture->data);
I have tried GL_UNSIGNED_SHORT_5_6_5 as the data type also tried GL_RGB5_A1 ands other combinations but nothing...Anyone have any ideas?
I will also have a need for color index textures but have yet to even attempt that one. I would like to get the 16bit working first but would also appreciate suggestions there...
Thanks in advance...
Bill
I have texture mapping working but I have to convert all the textures to 24bit(888) format using GL_RGB/GL_UNSIGNED_BYTE as paramters and this all works well.
glTexImage2D(GL_TEXTURE_2D,
0, /* Number of MipMap Levels */
3, /* Blending components */
GL_Texture->x, /* Texture Dimentions */
GL_Texture->y,
0, /* Border Width */
GL_RGB, /* GL_RGB, GL_RGBA, etc... pg. 265 */
GL_UNSIGNED_BYTE, /* Bytes per pixel format */
&GL_Texture->data);
I have tried GL_UNSIGNED_SHORT_5_6_5 as the data type also tried GL_RGB5_A1 ands other combinations but nothing...Anyone have any ideas?
I will also have a need for color index textures but have yet to even attempt that one. I would like to get the 16bit working first but would also appreciate suggestions there...
Thanks in advance...
Bill