PDA

View Full Version : internal Format with glTexImage2D



Diapolo
04-17-2000, 12:45 PM
If I want to use 24 Bit Textures (explicit), I have to call:

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, width, height, 0, c_type, GL_UNSIGNED_BYTE, raw_bitmap);

(GL_RGB8)
Is this right?

What is if I want to use (explicit) 16 / 32 Bit Textures? What do I have to use then? An what´s up with GL_RGB4. Who can explain this a bit to me?

Diapolo

Humus
04-17-2000, 02:33 PM
For 32 bit textures you can use GL_RGBA8.
For 16 bit textures you can use GL_RGB5_A1 or GL_RGBA4 depending on your needs.