PDA

View Full Version : glCompressedTexImage2D for non compressed image 2d



Groovounet
01-02-2008, 09:28 AM
I like the glCompressedTexImage2D function so for non reason I tryed to load a non compressed image 2D usually loaded with glTexImage2D with it...

Unfortunalety, I get an OpenGL error and image remainds black... I checked in the OpenGL specification and it's actually written that glCompressedTexImage2D take the same formats that glTexImage2D... so I guest It's possible in theory but I might have made a mistake.

Is someone tryed this too? I don't use the swizzling and format cast capability of glTexImage*D so I guest using glCompressedTexImage*D would simply a bit the thing around.

Thank

Zengar
01-02-2008, 09:43 AM
You understood something wrong. You can't load an uncompressed image with this function. See: http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage2D.xml

Groovounet
01-02-2008, 10:26 AM
Right... my mistake sorry...
Thank anyway!

Groovounet
01-02-2008, 10:30 AM
I never visit those man pages before... this is great! Thank again!