I´m currently playing arround wit S3TC on my GF2 GTS. I looked at the NVIDIA demo for S3TC, but I have got a few problems.
- I have got a DDS file that contains a 20482048 texture with 11 mipmap levels (from 10241024 downwards) the format is GL_COMPRESSED_RGB_S3TC_DXT1_EXT
- I allocate the memory for the DDS file
- I read the file into a buffer
- the code for getting the S3TC image size is the one from the NV demo (MipMapSize = ((TempTexture.Width + 3) / 4) * ((TempTexture.Height + 3) / 4) * BlockSize
I don´t understand why there is in brackets + 3? If the texture is 22 or 11 pixels, the buffer is allways 8 bytes.
I read that S3TC textures smaller than 4*4 pixels cause an error or are ignored, is that right?
If I try to leave out the mipmaps smaller than 44 pixels, no S3TC textures are drawn, nothing works, if I let OGL load the 22 and 1*1 mipmaps everything works, but why?
Perhaps anyone has got some good answers for me sigh?
By the way I think there are a few errors in the NV S3TC demo (buffer for DDS is too large, no support for 3 Bit color depth -> GL_COMPRESSED_RGB_S3TC_DXT1_EXT … etc.), but no one at NVIDIA answered my mails
(hope not too confusing for you all, well I AM confused)