42 #ifndef INCLUDED_DDS_H
43 #define INCLUDED_DDS_H
51 #include "DXGIFormat.h"
60 typedef unsigned char BYTE;
76 #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
77 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
78 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
98 D3DFMT_A2B10G10R10 = 31,
100 D3DFMT_X8B8G8R8 = 33,
102 D3DFMT_A2R10G10B10 = 35,
103 D3DFMT_A16B16G16R16 = 36,
114 D3DFMT_X8L8V8U8 = 62,
115 D3DFMT_Q8W8V8U8 = 63,
117 D3DFMT_A2W10V10U10 = 67,
120 D3DFMT_R8G8_B8G8 =
MAKEFOURCC(
'R',
'G',
'B',
'G'),
122 D3DFMT_G8R8_G8B8 =
MAKEFOURCC(
'G',
'R',
'G',
'B'),
129 D3DFMT_D16_LOCKABLE = 70,
137 D3DFMT_D32F_LOCKABLE = 82,
141 #if !defined(D3D_DISABLE_9EX)
144 D3DFMT_D32_LOCKABLE = 84,
145 D3DFMT_S8_LOCKABLE = 85,
147 #endif // !D3D_DISABLE_9EX
153 D3DFMT_VERTEXDATA =100,
157 D3DFMT_Q16W16V16U16 =110,
159 D3DFMT_MULTI2_ARGB8 =
MAKEFOURCC(
'M',
'E',
'T',
'1'),
165 D3DFMT_G16R16F = 112,
166 D3DFMT_A16B16G16R16F = 113,
170 D3DFMT_G32R32F = 115,
171 D3DFMT_A32B32G32R32F = 116,
176 #if !defined(D3D_DISABLE_9EX)
182 D3DFMT_A2B10G10R10_XR_BIAS = 119,
186 D3DFMT_BINARYBUFFER = 199,
188 #endif // !D3D_DISABLE_9EX
192 D3DFMT_FORCE_DWORD =0x7fffffff
195 #endif // _d3d9TYPES_H_
207 #define D3D10_REQ_MIP_LEVELS ( 14 )
212 #define D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION ( 512 )
218 { D3D10_RESOURCE_DIMENSION_UNKNOWN = 0,
219 D3D10_RESOURCE_DIMENSION_BUFFER = 1,
220 D3D10_RESOURCE_DIMENSION_TEXTURE1D = 2,
221 D3D10_RESOURCE_DIMENSION_TEXTURE2D = 3,
222 D3D10_RESOURCE_DIMENSION_TEXTURE3D = 4
225 #endif // __d3d10_h__
239 #define DDS_MAGIC 0x20534444 // "DDS "
257 #define DDS_FOURCC 0x00000004
261 #define DDS_RGB 0x00000040
265 #define DDS_RGBA 0x00000041
270 #define DDS_LUMINANCE 0x00020000
274 #define DDS_ALPHA 0x00000002
277 {
sizeof(
DDS_PIXELFORMAT),
DDS_FOURCC,
MAKEFOURCC(
'D',
'X',
'T',
'1'), 0, 0, 0, 0, 0 };
280 {
sizeof(
DDS_PIXELFORMAT),
DDS_FOURCC,
MAKEFOURCC(
'D',
'X',
'T',
'2'), 0, 0, 0, 0, 0 };
283 {
sizeof(
DDS_PIXELFORMAT),
DDS_FOURCC,
MAKEFOURCC(
'D',
'X',
'T',
'3'), 0, 0, 0, 0, 0 };
286 {
sizeof(
DDS_PIXELFORMAT),
DDS_FOURCC,
MAKEFOURCC(
'D',
'X',
'T',
'4'), 0, 0, 0, 0, 0 };
289 {
sizeof(
DDS_PIXELFORMAT),
DDS_FOURCC,
MAKEFOURCC(
'D',
'X',
'T',
'5'), 0, 0, 0, 0, 0 };
308 {
sizeof(
DDS_PIXELFORMAT),
DDS_FOURCC,
MAKEFOURCC(
'D',
'X',
'1',
'0'), 0, 0, 0, 0, 0 };
310 #define DDS_HEADER_FLAGS_TEXTURE 0x00001007
311 #define DDS_HEADER_FLAGS_MIPMAP 0x00020000
312 #define DDS_HEADER_FLAGS_VOLUME 0x00800000
313 #define DDS_HEADER_FLAGS_PITCH 0x00000008
314 #define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000
316 #define DDS_SURFACE_FLAGS_TEXTURE 0x00001000
317 #define DDS_SURFACE_FLAGS_MIPMAP 0x00400008
318 #define DDS_SURFACE_FLAGS_CUBEMAP 0x00000008
320 #define DDSCAPS2_CUBEMAP 0x00000200
321 #define DDS_CUBEMAP_POSITIVEX 0x00000600
322 #define DDS_CUBEMAP_NEGATIVEX 0x00000a00
323 #define DDS_CUBEMAP_POSITIVEY 0x00001200
324 #define DDS_CUBEMAP_NEGATIVEY 0x00002200
325 #define DDS_CUBEMAP_POSITIVEZ 0x00004200
326 #define DDS_CUBEMAP_NEGATIVEZ 0x00008200
330 #define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\
331 DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\
332 DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ )
334 #define DDS_FLAGS_VOLUME 0x00200000
367 #define DDS_LUMINANCEA 0x00020001 // DDPF_LUMINANCE | DDPF_ALPHAPIXELS
373 {
sizeof(
DDS_PIXELFORMAT), DDS_LUMINANCEA, 0, 16, 0x00ff, 0x0000, 0x0000, 0xff00 };
381 #endif // INCLUDED_DDS_H
const DDS_PIXELFORMAT DDSPF_DX10
DX10 Pixel format.
Definition: dds.h:307
const DDS_PIXELFORMAT DDSPF_R8G8B8
R8G8B8 Pixel format.
Definition: dds.h:300
const DDS_PIXELFORMAT DDSPF_DXT5
DXT5 Pixel format.
Definition: dds.h:288
uint32_t DWORD
Type used in orignal DirectX dds.h file.
Definition: dds.h:59
unsigned char BYTE
Type used in orignal DirectX dds.h file.
Definition: dds.h:60
const DDS_PIXELFORMAT DDSPF_DXT3
DXT3 Pixel format.
Definition: dds.h:282
const DDS_PIXELFORMAT DDSPF_A4R4G4B4
A4R4G4B4 Pixel format.
Definition: dds.h:297
#define DDS_ALPHA
Definition: dds.h:274
#define DDS_RGB
Definition: dds.h:261
#define DDS_RGBA
Definition: dds.h:265
const DDS_PIXELFORMAT DDSPF_R5G6B5
R5G6B5 Pixel format.
Definition: dds.h:303
#define MAKEFOURCC(ch0, ch1, ch2, ch3)
Definition: dds.h:76
uint32_t UINT
Type used in orignal DirectX dds.h file.
Definition: dds.h:61
#define DDS_FOURCC
Definition: dds.h:257
D3D10_RESOURCE_DIMENSION
Definition: dds.h:216
const DDS_PIXELFORMAT DDSPF_A1R5G5B5
A1R5G5B5 Pixel format.
Definition: dds.h:294
const DDS_PIXELFORMAT DDSPF_DXT1
DXT1 Pixel format.
Definition: dds.h:276
const DDS_PIXELFORMAT DDSPF_A8R8G8B8
A8R8G8B8 Pixel format.
Definition: dds.h:291
const DDS_PIXELFORMAT DDSPF_DXT2
DXT2 Pixel format.
Definition: dds.h:279
const DDS_PIXELFORMAT DDSPF_DXT4
DXT4 Pixel format.
Definition: dds.h:285
enum _D3DFORMAT D3DFORMAT
_D3DFORMAT
Definition: dds.h:83