dxt3 / s3tc compression usage

i am loading a dds image data this way:

RGBA_DXT3 = 33778;


glGenTextures(1, Texture);
glBindTexture(GL_TEXTURE_2D, Texture);

isize:= ((width + 3) div 4) * ((height + 3) div 4) * 8;

glCompressedTexImage2DARB(GL_TEXTURE_2D, 0, RGBA_DXT3,
width, height, 0, isize, pData);

the images created are all white -
after the load texture call i get
glgeterror = $0502

which means

what am i doing wrong here?
do i need to set up anything else before this?
i have chedked the extension, geforce4 mx
can load dxt compressed images fine…

  • how do i create a image from dxt3 compressed data in opengl?

On the NVIDIA website, they have an example for loading DDS file.

Or, try this link :

Search the “DDS Texture Loader” section.