MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / dds_pixelformat

Class dds_pixelformat

Source/astcenccli_image_load_store.cpp:1696–1710  ·  view source on GitHub ↗

Loader for DDS files. Note that after the header, data are densely packed with no padding; in the case of multiple surfaces, they appear one after another in the file, again with no padding. This code is NOT endian-neutral. */

Source from the content-addressed store, hash-verified

1694 This code is NOT endian-neutral.
1695*/
1696struct dds_pixelformat
1697{
1698 uint32_t size; // structure size, set to 32.
1699 /*
1700 flags bits are a combination of the following: 0x1 : Texture contains alpha data 0x2 : ---- (older files: texture contains alpha data, for Alpha-only texture) 0x4 : The fourcc field is valid,
1701 indicating a compressed or DX10 texture format 0x40 : texture contains uncompressed RGB data 0x200 : ---- (YUV in older files) 0x20000 : Texture contains Luminance data (can be combined with
1702 0x1 for Lum-Alpha) */
1703 uint32_t flags;
1704 uint32_t fourcc; // "DX10" to indicate a DX10 format, "DXTn" for the DXT formats
1705 uint32_t rgbbitcount; // number of bits per texel; up to 32 for non-DX10 formats.
1706 uint32_t rbitmask; // bitmap indicating position of red/luminance color component
1707 uint32_t gbitmask; // bitmap indicating position of green color component
1708 uint32_t bbitmask; // bitmap indicating position of blue color component
1709 uint32_t abitmask; // bitmap indicating position of alpha color component
1710};
1711
1712struct dds_header
1713{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected