Advertisement

8-bit textures ?

Started by October 25, 2000 10:43 AM
2 comments, last by wiek 24 years ago
Hi, can anybody tell me how to change the tutorial-code so I can use 8-bit textures, instead of 24-bit ? That would save a lot of memory, right ? Thanks a lot ! Wiek

substitute RG_R3_G3_B2 for the first GL_RGB in glTexImage2D(..)

http://members.xoom.com/myBollux
Advertisement
so, will this save memory? or does it convert the 8bit into true color?
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Well theres a few ways to do this.

1. Specify an 8bit internal format when passing the texture with glTexImage2D. If the driver supports the format it should only use 8 bits to store the texture on your card. However the OGL specs. say that this isn''t mandatory. So so driver dependant time again!

2. Use a paletted texture. Make sure your card supports EXT_color_table and use 8 bit textures directly.

My .tga loading code does paletted textures.

Paul.

Paul Groves
pauls opengl page
Paul Grovespauls opengl page

This topic is closed to new replies.

Advertisement