Module dagon.resource.dds
DirectDraw Surface (DDS) loader.
Description
The dagon.resource.dds module defines the function for reading DDS files
into GPU-ready texture buffers. The loader supports compressed formats
(DXT1, DXT3, DXT5, BC4, BC5, BC6H, BC7, ASTC), cubemaps, mipmaps, and 3D/volume textures.
Functions
| Name | Description |
loadDDS(istrm, buffer)
|
Loads a DDS file from an input stream into a texture buffer.
|
makeFourCC(ch0, ch1, ch2, ch3)
|
Converts four ASCII characters to a FourCC code.
|
resourceFormatFromFourCC(fourCC)
|
Maps a FourCC code to a DXGIFormat.
|
saveDDS(output, buffer)
|
Saves a TextureBuffer to DDS file.
Supports uncompressed and S3TC-compressed textures.
|
saveDDS(output, texture)
|
Saves a texture to DDS file.
Supports uncompressed and S3TC-compressed textures.
|
Structs
| Name | Description |
DDSColorKey
|
Structure for color key information in DDS headers.
|
|
Structure describing the main DDS header.
|
|
Structure describing the DXT10 extended header (for newer DDS formats).
|
DDSPixelFormat
|
Structure describing the pixel format in a DDS file.
|