-
Notifications
You must be signed in to change notification settings - Fork 462
EncodeDDSHeader
DirectXTex |
---|
Helper functions for creating your own 'magic value' + DDS_HEADER
structure. The smallest valid header is 128 bytes. The "DX10" extended header is 148 bytes. If pDestination
is nullptr, it will return the amount of memory required.
HRESULT EncodeDDSHeader( const TexMetadata& metadata, DDS_FLAGS flags,
void* pDestination, size_t maxsize,
size_t& required);
The flags parameter is one of the DDS_FLAGS
. By default use DDS_FLAGS_NONE
. See DDS-I-O-Functions for more information about these flags.
maxsize is the amount of memory pointed to by pDestination. required is the returned as the amount of used space.
This function will succeed with an S_OK
or will return a HRESULT error code (E_INVALIDARG
, E_FAIL
, HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)
, HRESULT_FROM_WIN32(ERROR_CANNOT_MAKE)
, or HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW)
).
This function is marked noexcept
, and does not throw C++ exceptions.
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Xbox One
- Xbox Series X|S
- Windows Subsystem for Linux
- x86
- x64
- ARM64
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v20
- GCC 10.5, 11.4, 12.3, 13.3, 14.2
- MinGW 12.2, 13.2
- CMake 3.21
DirectX Tool Kit for DirectX 11