I try to load a compressed texture with glCompressedTexImage2DARB(…); But on every mipmap I load, I receive an invalid enumerant error.
Here is the code: (the image is stored like in a dds-file created by the NV-PS pluggin)
I have a switch block in front of the slope, if the format is DXT3 and DXT5 I set the blocksize to 16 otherwise its 8 …
I just checked the supported compression formats:
glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, &num);
int *list = new int[num];
glGetIntegerv(GL_COMPRESSED_TEXTURE_FORMATS_ARB, list);
And it seems that RGB_DXT1(33776), RGBA_DXT3(33778) and RGBA_DXT5(3377) are supported.
[This message has been edited by TheMummy (edited 03-28-2002).]
If you read the spec, you will see that it explains that RGBA_S3TC_DXT1 is not supposed to be listed by that because it is not a general-purpose format.
Here is some more info about the method.
In the file there are 7 mipmaps, and the slope calculates these values during runtime:
width:64 height:64 size:4096
width:32 height:32 size:1024
width:16 height:16 size:256
width:8 height:8 size:64
width:4 height:4 size:16
width:2 height:2 size:16
width:1 height:1 size:16
Is this correct ?
Do I have to activate something else to make it work?