25 #include <DXUtils/d3dx12.h> 29 #if defined(_MSC_VER) && (_MSC_VER<1610) && !defined(_In_reads_) 30 #define _In_reads_(exp) 31 #define _Out_writes_(exp) 32 #define _In_reads_bytes_(exp) 33 #define _In_reads_opt_(exp) 37 #ifndef _Use_decl_annotations_ 38 #define _Use_decl_annotations_ 42 enum class DDS_ALPHA_MODE : std::uint8_t {
43 DDS_ALPHA_MODE_UNKNOWN = 0,
44 DDS_ALPHA_MODE_STRAIGHT = 1,
45 DDS_ALPHA_MODE_PREMULTIPLIED = 2,
46 DDS_ALPHA_MODE_OPAQUE = 3,
47 DDS_ALPHA_MODE_CUSTOM = 4,
51 HRESULT CreateDDSTextureFromMemory(_In_ ID3D11Device* d3dDevice,
52 _In_reads_bytes_(ddsDataSize)
const uint8_t* ddsData,
53 _In_ std::size_t ddsDataSize,
54 _Outptr_opt_ ID3D11Resource** texture,
55 _Outptr_opt_ ID3D11ShaderResourceView** textureView,
56 _In_ std::size_t maxsize = 0,
57 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 60 HRESULT CreateDDSTextureFromMemory12(_In_ ID3D12Device* device,
61 _In_ ID3D12GraphicsCommandList* cmdList,
62 _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
63 _In_
std::
size_t ddsDataSize,
64 _Out_ Microsoft::WRL::ComPtr<ID3D12Resource>& texture,
65 _Out_ Microsoft::WRL::ComPtr<ID3D12Resource>& textureUploadHeap,
66 _In_
std::
size_t maxsize = 0,
67 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 70 HRESULT CreateDDSTextureFromFile(_In_ ID3D11Device* d3dDevice,
71 _In_z_ const
wchar_t* szFileName,
72 _Outptr_opt_ ID3D11Resource** texture,
73 _Outptr_opt_ ID3D11ShaderResourceView** textureView,
74 _In_
std::
size_t maxsize = 0,
75 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 78 HRESULT CreateDDSTextureFromFile12(_In_ ID3D12Device* device,
79 _In_ ID3D12GraphicsCommandList* cmdList,
80 _In_z_ const
wchar_t* szFileName,
81 _Out_ Microsoft::WRL::ComPtr<ID3D12Resource>& texture,
82 _Out_ Microsoft::WRL::ComPtr<ID3D12Resource>& textureUploadHeap,
83 _In_
std::
size_t maxsize = 0,
84 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 88 HRESULT CreateDDSTextureFromMemory(_In_ ID3D11Device* d3dDevice,
89 _In_opt_ ID3D11DeviceContext* d3dContext,
90 _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
91 _In_
std::
size_t ddsDataSize,
92 _Outptr_opt_ ID3D11Resource** texture,
93 _Outptr_opt_ ID3D11ShaderResourceView** textureView,
94 _In_
std::
size_t maxsize = 0,
95 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 98 HRESULT CreateDDSTextureFromFile(_In_ ID3D11Device* d3dDevice,
99 _In_opt_ ID3D11DeviceContext* d3dContext,
100 _In_z_ const
wchar_t* szFileName,
101 _Outptr_opt_ ID3D11Resource** texture,
102 _Outptr_opt_ ID3D11ShaderResourceView** textureView,
103 _In_
std::
size_t maxsize = 0,
104 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 108 HRESULT CreateDDSTextureFromMemoryEx(_In_ ID3D11Device* d3dDevice,
109 _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
110 _In_
std::
size_t ddsDataSize,
111 _In_
std::
size_t maxsize,
112 _In_ D3D11_USAGE usage,
113 _In_
unsigned int bindFlags,
114 _In_
unsigned int cpuAccessFlags,
115 _In_
unsigned int miscFlags,
117 _Outptr_opt_ ID3D11Resource** texture,
118 _Outptr_opt_ ID3D11ShaderResourceView** textureView,
119 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 122 HRESULT CreateDDSTextureFromFileEx(_In_ ID3D11Device* d3dDevice,
123 _In_z_ const
wchar_t* szFileName,
124 _In_
std::
size_t maxsize,
125 _In_ D3D11_USAGE usage,
126 _In_
unsigned int bindFlags,
127 _In_
unsigned int cpuAccessFlags,
128 _In_
unsigned int miscFlags,
130 _Outptr_opt_ ID3D11Resource** texture,
131 _Outptr_opt_ ID3D11ShaderResourceView** textureView,
132 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 136 HRESULT CreateDDSTextureFromMemoryEx(_In_ ID3D11Device* d3dDevice,
137 _In_opt_ ID3D11DeviceContext* d3dContext,
138 _In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
139 _In_
std::
size_t ddsDataSize,
140 _In_
std::
size_t maxsize,
141 _In_ D3D11_USAGE usage,
142 _In_
unsigned int bindFlags,
143 _In_
unsigned int cpuAccessFlags,
144 _In_
unsigned int miscFlags,
146 _Outptr_opt_ ID3D11Resource** texture,
147 _Outptr_opt_ ID3D11ShaderResourceView** textureView,
148 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr 151 HRESULT CreateDDSTextureFromFileEx(_In_ ID3D11Device* d3dDevice,
152 _In_opt_ ID3D11DeviceContext* d3dContext,
153 _In_z_ const
wchar_t* szFileName,
154 _In_
std::
size_t maxsize,
155 _In_ D3D11_USAGE usage,
156 _In_
unsigned int bindFlags,
157 _In_
unsigned int cpuAccessFlags,
158 _In_
unsigned int miscFlags,
160 _Outptr_opt_ ID3D11Resource** texture,
161 _Outptr_opt_ ID3D11ShaderResourceView** textureView,
162 _Out_opt_ DDS_ALPHA_MODE* alphaMode =
nullptr Definition: DDSTextureLoader.h:41
Definition: _tbb_windef.h:37