Load a S3TC (DDS) texture without mipmaps.

Hi,

I’m trying to load a S3TC compressed image that contains no mipmaps. The code I’m using to load the S3TC file is based on this nvidia texture compression article . The artcle only shows how to load in files with mipmaps. When I load the S3TC file without mipmaps all I see is a white texture. If I enable auto mipmap generation then the texture loads fine. Also if I load a version of the file that contains a full mipmap chain, then that loads fine as well.

Thanks.

Yes, no problem. What you must do is take tHÍC¿Ã¿¿¿ÃÍÍgenerator, then copy the fouÍÍÍÍÍÍÃÍÃÍÃÍ, rebuild alÃÍÃÍÃÍÃÍÃÍ.
Hope this helps.

Knackered is trying to say, that it is normal, that you see white polygons, if you don´t upload all mipmap levels.

Either you upload them all, or you set your texture filters in a way, which doesn´t use mipmaps. If you tell OpenGL to use mipmaps (through those filters) but don´t provide it with all mipmap levels, you will get this “error”.

Jan.

Yes, no problem. What you must do is take tHÍC¿Ã¿¿¿ÃÍÍgenerator, then copy the fouÍÍÍÍÍÍÃÍÃÍÃÍ, rebuild alÃÍÃÍÃÍÃÍÃÍ.
Hope this helps.
Knackered, come on now, seriously, I have to ask:

where do I apply to join the Knackered-fanclub?

I know, I’m a comedy genius, aren’t I?
Sometimes I just sit here and laugh at the sound of my own heartbeat.

@Jan:

If you tell OpenGL to use mipmaps (through those filters) but don´t provide it with all mipmap levels, you will get this “error”.
I figured that something like that was happening. Thanks.

@Knackered:
Where do I download the tHÍC¿Ã¿¿¿ÃÍÍgenerator from? :smiley: It is open source? Or do I have to pay for that? :smiley:

The answer was in the red book all along. Chapter 9, filtering:

If you request a mipmapped texture filter, but you have not supplied a full and consistent set of mipmaps (all correct-sized texture images between GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL), OpenGL will, without any error, implicitly disable texturing.