View Full Version : Compressed sRGB?

06-01-2009, 10:08 AM
The documentation for glCompressedTexImage2D() states that internalformat must be an extension-specified compressed-texture format.
GL_COMPRESSED_SRGB is a generic, not a specific, format, so I assume it will not work with glCompressedTexImage2D(). But I don't see any specific compressed format alternative that will give me the automatic color space conversion from sRGB to linear RGB. So how do I load compressed sRGB?

06-01-2009, 10:34 AM
Look at this extension:

06-01-2009, 12:25 PM
Thanks for that. Is there a flag indicating whether the format is sRGB, or a gamma value, in the dds header? I don't know how to detect whether the file is linear or sRGB or some gamma...

06-01-2009, 02:01 PM
It looks like you can get this information from the DDS_HEADER_DXT10 header (http://msdn.microsoft.com/en-us/library/bb943983(VS.85).aspx) (DX10 API). Look at the DXGI_FORMAT description (http://msdn.microsoft.com/en-us/library/bb173059(VS.85).aspx).

Now I do not know which software application is able to write the latest dds format.