Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
DrawDX.h
Go to the documentation of this file.
1 //
5 //
6 
7 #ifndef _INC_DrawDX_H
8 #define _INC_DrawDX_H
9 #ifndef NO_PRAGMA_ONCE
10 #pragma once
11 #endif
12 
13 #ifdef USE_DX_SHOW
14 #include <ddraw.h> // related to USE_DX9
15 #else // allow read of DDS in __linux__.
16 
17 typedef struct _DDCOLORKEY
18 {
24 
25 #define DUMMYUNIONNAMEN(a)
26 
27 typedef struct _DDSCAPS2
28 {
29  UINT32 dwCaps;
30  UINT32 dwCaps2;
31  UINT32 dwCaps3;
32  union
33  {
34  UINT32 dwCaps4;
35  UINT32 dwVolumeDepth;
36  } DUMMYUNIONNAMEN(1);
38 
39 typedef struct _DDPIXELFORMAT
40 {
41  UINT32 dwSize;
42  UINT32 dwFlags;
43  UINT32 dwFourCC;
44  union
45  {
46  UINT32 dwRGBBitCount;
47  UINT32 dwYUVBitCount;
49  UINT32 dwAlphaBitDepth;
51  UINT32 dwBumpBitCount;
54  } DUMMYUNIONNAMEN(1);
55  union
56  {
57  UINT32 dwRBitMask;
58  UINT32 dwYBitMask;
61  UINT32 dwBumpDuBitMask;
62  UINT32 dwOperations;
63  } DUMMYUNIONNAMEN(2);
64  union
65  {
66  UINT32 dwGBitMask; // mask for green bits
67  UINT32 dwUBitMask; // mask for U bits
68  UINT32 dwZBitMask; // mask for Z bits
69  UINT32 dwBumpDvBitMask; // mask for bump map V delta bits
70  struct
71  {
72  WORD wFlipMSTypes; // Multisample methods supported via flip for this D3DFORMAT
73  WORD wBltMSTypes; // Multisample methods supported via blt for this D3DFORMAT
75  } DUMMYUNIONNAMEN(3);
76  union
77  {
78  UINT32 dwBBitMask; // mask for blue bits
79  UINT32 dwVBitMask; // mask for V bits
80  UINT32 dwStencilBitMask; // mask for stencil bits
81  UINT32 dwBumpLuminanceBitMask; // mask for luminance in bump map
82  } DUMMYUNIONNAMEN(4);
83  union
84  {
85  UINT32 dwRGBAlphaBitMask; // mask for alpha channel
86  UINT32 dwYUVAlphaBitMask; // mask for alpha channel
87  UINT32 dwLuminanceAlphaBitMask;// mask for alpha channel
88  UINT32 dwRGBZBitMask; // mask for Z channel
89  UINT32 dwYUVZBitMask; // mask for Z channel
90  } DUMMYUNIONNAMEN(5);
92 
93 typedef struct _DDSURFACEDESC2
94 {
95  UINT32 dwSize; // size of the DDSURFACEDESC structure
96  UINT32 dwFlags; // determines what fields are valid
97  UINT32 dwHeight; // height of surface to be created
98  UINT32 dwWidth; // width of input surface
99  union
100  {
101  INT32 lPitch; // distance to start of next line (return value only)
102  UINT32 dwLinearSize; // Formless late-allocated optimized surface size
103  } DUMMYUNIONNAMEN(1);
104  union
105  {
106  UINT32 dwBackBufferCount; // number of back buffers requested
107  UINT32 dwDepth; // the depth if this is a volume texture
108  } DUMMYUNIONNAMEN(5);
109  union
110  {
111  UINT32 dwMipMapCount; // number of mip-map levels requestde
112  // dwZBufferBitDepth removed, use ddpfPixelFormat one instead
113  UINT32 dwRefreshRate; // refresh rate (used when display mode is described)
114  UINT32 dwSrcVBHandle; // The source used in VB::Optimize
115  } DUMMYUNIONNAMEN(2);
116  UINT32 dwAlphaBitDepth; // depth of alpha buffer requested
117  UINT32 dwReserved; // reserved
118  void* lpSurface; // pointer to the associated surface memory
119  union
120  {
121  DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
122  UINT32 dwEmptyFaceColor; // Physical color for empty cubemap faces
123  } DUMMYUNIONNAMEN(3);
124  DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
125  DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
126  DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
127  union
128  {
129  DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
130  UINT32 dwFVF; // vertex format description of vertex buffers
131  } DUMMYUNIONNAMEN(4);
132  DDSCAPS2 ddsCaps; // direct draw surface capabilities
133  UINT32 dwTextureStage; // stage in multitexture cascade
135 
136 #endif // USE_DX_SHOW
137 #endif // _INC_DrawDX_H
struct _DDSURFACEDESC2 DDSURFACEDESC2
struct _DDPIXELFORMAT DDPIXELFORMAT
struct _DDSCAPS2 DDSCAPS2
struct _DDCOLORKEY DDCOLORKEY
#define DUMMYUNIONNAMEN(a)
Definition: DrawDX.h:25
Definition: DrawDX.h:18
UINT32 dwColorSpaceHighValue
to be treated as Color Key, inclusive
Definition: DrawDX.h:21
UINT32 dwColorSpaceLowValue
be treated as Color Key, inclusive
Definition: DrawDX.h:19
Definition: DrawDX.h:40
UINT32 dwPrivateFormatBitCount
format list and if DDPF_D3DFORMAT is set
Definition: DrawDX.h:52
UINT32 dwRGBZBitMask
Definition: DrawDX.h:88
UINT32 dwYUVZBitMask
Definition: DrawDX.h:89
UINT32 dwStencilBitMask
Definition: DrawDX.h:80
UINT32 dwLuminanceBitCount
how many bits per pixel
Definition: DrawDX.h:50
UINT32 dwRBitMask
mask for red bit
Definition: DrawDX.h:57
UINT32 dwLuminanceAlphaBitMask
Definition: DrawDX.h:87
WORD wBltMSTypes
Definition: DrawDX.h:73
UINT32 dwRGBAlphaBitMask
Definition: DrawDX.h:85
UINT32 dwUBitMask
Definition: DrawDX.h:67
UINT32 dwFourCC
(FOURCC code)
Definition: DrawDX.h:43
UINT32 dwFlags
pixel format flags
Definition: DrawDX.h:42
UINT32 dwOperations
DDPF_D3DFORMAT Operations.
Definition: DrawDX.h:62
UINT32 dwBumpLuminanceBitMask
Definition: DrawDX.h:81
UINT32 dwBumpDuBitMask
mask for bump map U delta bits
Definition: DrawDX.h:61
WORD wFlipMSTypes
Definition: DrawDX.h:72
UINT32 dwZBitMask
Definition: DrawDX.h:68
UINT32 dwAlphaBitDepth
how many bits for alpha channels
Definition: DrawDX.h:49
struct _DDPIXELFORMAT::@13::@19 MultiSampleCaps
UINT32 dwLuminanceBitMask
mask for luminance bits
Definition: DrawDX.h:60
UINT32 dwVBitMask
Definition: DrawDX.h:79
UINT32 dwBumpBitCount
how many bits per "buxel", total
Definition: DrawDX.h:51
UINT32 dwYUVBitCount
how many bits per pixel
Definition: DrawDX.h:47
UINT32 dwRGBBitCount
how many bits per pixel
Definition: DrawDX.h:46
UINT32 dwBumpDvBitMask
Definition: DrawDX.h:69
UINT32 dwYUVAlphaBitMask
Definition: DrawDX.h:86
UINT32 dwSize
size of structure
Definition: DrawDX.h:41
UINT32 dwZBufferBitDepth
how many total bits/pixel in z buffer (including any stencil bits)
Definition: DrawDX.h:48
UINT32 dwYBitMask
mask for Y bits
Definition: DrawDX.h:58
UINT32 dwGBitMask
Definition: DrawDX.h:66
UINT32 dwStencilBitDepth
how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
Definition: DrawDX.h:59
UINT32 dwBBitMask
Definition: DrawDX.h:78
Definition: DrawDX.h:28
UINT32 dwCaps
capabilities of surface wanted
Definition: DrawDX.h:29
UINT32 dwCaps3
Definition: DrawDX.h:31
UINT32 dwCaps4
Definition: DrawDX.h:34
UINT32 dwCaps2
Definition: DrawDX.h:30
UINT32 dwVolumeDepth
Definition: DrawDX.h:35
Definition: DrawDX.h:94
DDSCAPS2 ddsCaps
Definition: DrawDX.h:132
INT32 lPitch
Definition: DrawDX.h:101
UINT32 dwFlags
Definition: DrawDX.h:96
DDPIXELFORMAT ddpfPixelFormat
Definition: DrawDX.h:129
UINT32 dwBackBufferCount
Definition: DrawDX.h:106
UINT32 dwMipMapCount
Definition: DrawDX.h:111
UINT32 dwFVF
Definition: DrawDX.h:130
UINT32 dwRefreshRate
Definition: DrawDX.h:113
DDCOLORKEY ddckCKDestOverlay
Definition: DrawDX.h:121
DDCOLORKEY ddckCKSrcOverlay
Definition: DrawDX.h:125
UINT32 dwAlphaBitDepth
Definition: DrawDX.h:116
void * lpSurface
Definition: DrawDX.h:118
UINT32 dwWidth
Definition: DrawDX.h:98
UINT32 dwDepth
Definition: DrawDX.h:107
DDCOLORKEY ddckCKDestBlt
Definition: DrawDX.h:124
DDCOLORKEY ddckCKSrcBlt
Definition: DrawDX.h:126
UINT32 dwHeight
Definition: DrawDX.h:97
UINT32 dwSrcVBHandle
Definition: DrawDX.h:114
UINT32 dwLinearSize
Definition: DrawDX.h:102
UINT32 dwReserved
Definition: DrawDX.h:117
UINT32 dwSize
Definition: DrawDX.h:95
UINT32 dwTextureStage
Definition: DrawDX.h:133
UINT32 dwEmptyFaceColor
Definition: DrawDX.h:122