Navigation
API > API/Runtime > API/Runtime/ImageCore > API/Runtime/ImageCore/FDDSFile
Description
Write DDS-format data to memory. This produces a memory image of a DDS file.
Automatic format selection rules used are:
- D3D9 DDS does not support 1D or array textures directly, so these always write as D3D10
- The pixel format must be a "common" D3D9 format (more obscure formats can be used for D3D9 writing when InFormatVersion is D3D9, but "Auto" sticks with a restricted subset)
- For 8-bit pixel formats, the format must be non-sRGB.
The latter is somewhat arbitrary. D3D9 DDS files don't store whether pixels for a texture are meant to be interpreted as sRGB or not. This reader treats the resulting formats as non-sRGB UNORM, so the writer does the same for symmetry.
| Name | WriteDDS |
| Type | function |
| Header File | /Engine/Source/Runtime/ImageCore/Public/DDSFile.h |
| Include Path | #include "DDSFile.h" |
| Source | /Engine/Source/Runtime/ImageCore/Private/DDSFile.cpp |
EDDSError WriteDDS
(
TArray64< uint8 > & OutDDS,
EDDSFormatVersion InFormatVersion
)