Skip to main content
gamedev.net
🔒 Locked

Texture Compression

Started by GamerSg Jan 15, 2005 at 2:04 AM 3 replies 2.3k views
Original Post
GamerSg
GamerSg
Ive been looking at papers from nVidia and Googling around for information on this topic. It appears that using GL_COMPRESSED_RGB_ARB as the internal format is all that you need to do? Or should i be more specific and use GL_COMPRESSED_RGB_S3TC_DXT1_EXT? There doesnt appear to be any other format besides S3TC anyway. So is it safe to assume that using GL_COMPRESSED_RGB_ARB will always result to the drivers using GL_COMPRESSED_RGB_S3TC_DXT1_EXT and it's variants?
Yann L
Yann L
Quote:
Original post by GamerSg
Ive been looking at papers from nVidia and Googling around for information on this topic. It appears that using GL_COMPRESSED_RGB_ARB as the internal format is all that you need to do?

Pretty much, yes. In this case, you allow OpenGL to choose the actual compression format that it finds to be most suited (including none at all).

Quote:
Original post by GamerSg
Or should i be more specific and use GL_COMPRESSED_RGB_S3TC_DXT1_EXT?

This enumerant isn't part of ARB_texture_compression, but of EXT_texture_compression_s3tc. Sure, you can use it directly. The advantage is that you always know what you get, the drawback is that possible future compression schemes will need a code modification.

Quote:
Original post by GamerSg
There doesnt appear to be any other format besides S3TC anyway. So is it safe to assume that using GL_COMPRESSED_RGB_ARB will always result to the drivers using GL_COMPRESSED_RGB_S3TC_DXT1_EXT and it's variants?

[/quote]
No, it's not. OpenGL will probably use the s3tc variant on current hardware, but nothing guarantees it. On future hardware, it might choose an entirely different format. If you want to be 100% sure to get s3tc (eg. because you supply pre-compressed texture data), then use EXT_texture_compression_s3tc.
Nemesis2k2
Nemesis2k2
Quote:
There doesnt appear to be any other format besides S3TC anyway.

There is one called FXT1, which was done by 3DFX when they were still around. I think OpenGL supports this format, but I've never actually checked.
GamerSg
GamerSg
Quote:
Original post by Yann L
Quote:
Original post by GamerSg
Or should i be more specific and use GL_COMPRESSED_RGB_S3TC_DXT1_EXT?

This enumerant isn't part of ARB_texture_compression, but of EXT_texture_compression_s3tc. Sure, you can use it directly. The advantage is that you always know what you get, the drawback is that possible future compression schemes will need a code modification.


So what enumerants are currently part of ARB_texture_compression? Another question, does compressing textures significantly increase loading time? Should the compressing be a pre-process or is it insignificant?


zedzeek
zedzeek
>>So what enumerants are currently part of ARB_texture_compression? <<

see the spec for more info, u can query the card to see what compression methods a card supports

>>Another question, does compressing textures significantly increase loading time? Should the compressing be a pre-process or is it insignificant?<<

u can choose to either load a uncompressed texture and then compress it with the driver or u can load a compressed texture straight from disk, the second method id obviously quicker.
compressing them in the driver is not painfully slow

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.