PDA

View Full Version : Load a S3TC (DDS) texture without mipmaps.



dpoon
04-22-2005, 04:06 AM
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 (http://developer.nvidia.com/object/texture_compression_OpenGL.html) . 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.

knackered
04-22-2005, 05:02 AM
Yes, no problem. What you must do is take tH═C┐├┐┐┐├══generator, then copy the fou══════├═├═├═, rebuild al├═├═├═├═├═.
Hope this helps.

Jan
04-22-2005, 05:34 AM
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.

T101
04-22-2005, 07:40 AM
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?

knackered
04-22-2005, 10:38 AM
I know, I'm a comedy genius, aren't I?
Sometimes I just sit here and laugh at the sound of my own heartbeat.

dpoon
04-22-2005, 06:04 PM
@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? :D It is open source? Or do I have to pay for that? :D

dpoon
04-22-2005, 07:49 PM
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.