DDS_FLAGS Enumeration

Flags used in reading and writing .DDS files.

Syntax

enum DDS_FLAGS
{
    DDS_FLAGS_NONE = 0x0,
    DDS_FLAGS_LEGACY_DWORD = 0x1,
    DDS_FLAGS_NO_LEGACY_EXPANSION = 0x2,
    DDS_FLAGS_NO_R10B10G10A2_FIXUP = 0x4,
    DDS_FLAGS_FORCE_RGB = 0x8,
    DDS_FLAGS_NO_16BPP = 0x10,
    DDS_FLAGS_EXPAND_LUMINANCE,
    DDS_FLAGS_FORCE_DX10_EXT = 0x10000,
    DDS_FLAGS_FORCE_DX10_EXT_MISC2 = 0x20000
};  

Constants

Constant Description
DDS_FLAGS_NONE Default.
DDS_FLAGS_LEGACY_DWORD Used for loading some legacy Direct3D 8 era 24bpp .DDS files that use the non-standard DWORD alignment instead of BYTE.
DDS_FLAGS_NO_LEGACY_EXPANSION By default the loader will expand many legacy Direct3D 9 .DDS files to supported formats. The use of this flag prevents expansions that increase the size of the pixels, and will return a failure instead.
DDS_FLAGS_NO_R10B10G10A2_FIXUP By default, the loader uses a work-around for a long-standing issue with the D3DX DDS file format which reverses the RGB bit-masks for 10:10:10:2 formats. If this flag is used, then the loader instead assumes such data was written correctly.
DDS_FLAGS_FORCE_RGB By default many BGR formats are mapped directly to DXGI 1.1 formats. Use of this flag forces the use of DXGI 1.0 RGB formats instead for improved Direct3D 10.0+ driver support.
DDS_FLAGS_NO_16BPP By default, 5:6:5, 5:5:5:1, and 4:4:4:4 formats are returned as DXGI 1.2 formats. If this flag is used, the loader will expand these to R8G8B8A8 format instead.
DDS_FLAGS_EXPAND_LUMINANCE By default, legacy luminance formats are mapped to the same size formats in DXGI (L8 -> R8_UNORM, L16 -> R16_UNORM, A8L8 -> R8G8_UNORM). But having the same size formats requires some shader swizzling to replicate the original luminance greyscale behavior (.rrr or .rrrg). This matches the implementation of DDSTextureLoader. Specifying this flag will instead expand these formats on load and replicate the colors to achieve the proper greyscale without any shader changes, but these formats will be significantly larger (8:8:8:8 or 16:16:16:16).
DDS_FLAGS_FORCE_DX10_EXT When saving to DDS files, the writer uses legacy Direct3D 9 .DDS file formats if possible rather than the DX10 header extension for better compatibility with older tools. Using this flag, the writer will always generate DX10 extension header files which are faster to parse at load-time.
DDS_FLAGS_FORCE_DX10_EXT_MISC2 DDS_FLAGS_FORCE_DX10_EXT including miscFlags2 information (the result may not be compatible with D3DX10 or D3DX11). miscFlags2 is a field in the TexMetadata structure.

Requirements

Header: Declared in directxtex.h.