PDA

View Full Version : How widely is EXT_texture_compression_s3tc supported?



advil_user
02-18-2006, 09:19 PM
Hi, Folks,
How widely is EXT_texture_compression_s3tc supported?

How does one go about determining whether to use an extension in their code or not? (I'd like to avoid conditionals and variations as much as possible in my application)

Thanks,

Overmind
02-19-2006, 01:52 AM
It is supported on nearly every available card. See http://www.delphi3d.net/hardware/extsupport.php?extension=GL_EXT_texture_compressio n_s3tc

As for handling of unsupported extensions, there are several possibilities, depending on where in the code it occurs.

The texture compression is used only when loading textures, the rendering doesn't change at all, so it really doesn't matter when you use conditionals there.

Usually a better solution is to use a class hierarchy. For example, in my engine I have a virtual base class for material settings, and from that inherited a class that only uses combiners, a class that uses shaders and so on.

So I can move the extension check from render time to load time, depending on the hardware capabilities, a different subclass is instantiated when loading the material description from file.

advil_user
02-19-2006, 11:29 PM
This is a great link! Thanks.