annotate lib/legacy_dx/d3dcaps.h @ 2217:744ed51880ed

expand button
author Ritor1
date Sat, 15 Feb 2014 22:00:13 +0600
parents 9c0607679772
children
rev   line source
0
Ritor1
parents:
diff changeset
1 /*==========================================================================;
Ritor1
parents:
diff changeset
2 *
Ritor1
parents:
diff changeset
3 * Copyright (C) Microsoft Corporation. All Rights Reserved.
Ritor1
parents:
diff changeset
4 *
Ritor1
parents:
diff changeset
5 * File: d3dcaps.h
Ritor1
parents:
diff changeset
6 * Content: Direct3D capabilities include file
Ritor1
parents:
diff changeset
7 *
Ritor1
parents:
diff changeset
8 ***************************************************************************/
Ritor1
parents:
diff changeset
9
Ritor1
parents:
diff changeset
10 #ifndef _D3DCAPS_H
Ritor1
parents:
diff changeset
11 #define _D3DCAPS_H
Ritor1
parents:
diff changeset
12
Ritor1
parents:
diff changeset
13 /*
Ritor1
parents:
diff changeset
14 * Pull in DirectDraw include file automatically:
Ritor1
parents:
diff changeset
15 */
Ritor1
parents:
diff changeset
16 #include "ddraw.h"
Ritor1
parents:
diff changeset
17
Ritor1
parents:
diff changeset
18 #ifndef DIRECT3D_VERSION
Ritor1
parents:
diff changeset
19 #define DIRECT3D_VERSION 0x0700
Ritor1
parents:
diff changeset
20 #endif
Ritor1
parents:
diff changeset
21
Ritor1
parents:
diff changeset
22 #if defined(_X86_) || defined(_IA64_)
Ritor1
parents:
diff changeset
23 #pragma pack(4)
Ritor1
parents:
diff changeset
24 #endif
Ritor1
parents:
diff changeset
25
Ritor1
parents:
diff changeset
26 /* Description of capabilities of transform */
Ritor1
parents:
diff changeset
27
Ritor1
parents:
diff changeset
28 typedef struct _D3DTRANSFORMCAPS {
Ritor1
parents:
diff changeset
29 DWORD dwSize;
Ritor1
parents:
diff changeset
30 DWORD dwCaps;
Ritor1
parents:
diff changeset
31 } D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
Ritor1
parents:
diff changeset
32
Ritor1
parents:
diff changeset
33 #define D3DTRANSFORMCAPS_CLIP 0x00000001L /* Will clip whilst transforming */
Ritor1
parents:
diff changeset
34
Ritor1
parents:
diff changeset
35 /* Description of capabilities of lighting */
Ritor1
parents:
diff changeset
36
Ritor1
parents:
diff changeset
37 typedef struct _D3DLIGHTINGCAPS {
Ritor1
parents:
diff changeset
38 DWORD dwSize;
Ritor1
parents:
diff changeset
39 DWORD dwCaps; /* Lighting caps */
Ritor1
parents:
diff changeset
40 DWORD dwLightingModel; /* Lighting model - RGB or mono */
Ritor1
parents:
diff changeset
41 DWORD dwNumLights; /* Number of lights that can be handled */
Ritor1
parents:
diff changeset
42 } D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
Ritor1
parents:
diff changeset
43
Ritor1
parents:
diff changeset
44 #define D3DLIGHTINGMODEL_RGB 0x00000001L
Ritor1
parents:
diff changeset
45 #define D3DLIGHTINGMODEL_MONO 0x00000002L
Ritor1
parents:
diff changeset
46
Ritor1
parents:
diff changeset
47 #define D3DLIGHTCAPS_POINT 0x00000001L /* Point lights supported */
Ritor1
parents:
diff changeset
48 #define D3DLIGHTCAPS_SPOT 0x00000002L /* Spot lights supported */
Ritor1
parents:
diff changeset
49 #define D3DLIGHTCAPS_DIRECTIONAL 0x00000004L /* Directional lights supported */
Ritor1
parents:
diff changeset
50 #if(DIRECT3D_VERSION < 0x700)
Ritor1
parents:
diff changeset
51 #define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */
Ritor1
parents:
diff changeset
52 #endif
Ritor1
parents:
diff changeset
53 #if(DIRECT3D_VERSION < 0x500)
Ritor1
parents:
diff changeset
54 #define D3DLIGHTCAPS_GLSPOT 0x00000010L /* GL syle spot lights supported */
Ritor1
parents:
diff changeset
55 #endif
Ritor1
parents:
diff changeset
56
Ritor1
parents:
diff changeset
57 /* Description of capabilities for each primitive type */
Ritor1
parents:
diff changeset
58
Ritor1
parents:
diff changeset
59 typedef struct _D3DPrimCaps {
Ritor1
parents:
diff changeset
60 DWORD dwSize;
Ritor1
parents:
diff changeset
61 DWORD dwMiscCaps; /* Capability flags */
Ritor1
parents:
diff changeset
62 DWORD dwRasterCaps;
Ritor1
parents:
diff changeset
63 DWORD dwZCmpCaps;
Ritor1
parents:
diff changeset
64 DWORD dwSrcBlendCaps;
Ritor1
parents:
diff changeset
65 DWORD dwDestBlendCaps;
Ritor1
parents:
diff changeset
66 DWORD dwAlphaCmpCaps;
Ritor1
parents:
diff changeset
67 DWORD dwShadeCaps;
Ritor1
parents:
diff changeset
68 DWORD dwTextureCaps;
Ritor1
parents:
diff changeset
69 DWORD dwTextureFilterCaps;
Ritor1
parents:
diff changeset
70 DWORD dwTextureBlendCaps;
Ritor1
parents:
diff changeset
71 DWORD dwTextureAddressCaps;
Ritor1
parents:
diff changeset
72 DWORD dwStippleWidth; /* maximum width and height of */
Ritor1
parents:
diff changeset
73 DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
Ritor1
parents:
diff changeset
74 } D3DPRIMCAPS, *LPD3DPRIMCAPS;
Ritor1
parents:
diff changeset
75
Ritor1
parents:
diff changeset
76 /* D3DPRIMCAPS dwMiscCaps */
Ritor1
parents:
diff changeset
77
Ritor1
parents:
diff changeset
78 #define D3DPMISCCAPS_MASKPLANES 0x00000001L
Ritor1
parents:
diff changeset
79 #define D3DPMISCCAPS_MASKZ 0x00000002L
Ritor1
parents:
diff changeset
80 #define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
Ritor1
parents:
diff changeset
81 #define D3DPMISCCAPS_CONFORMANT 0x00000008L
Ritor1
parents:
diff changeset
82 #define D3DPMISCCAPS_CULLNONE 0x00000010L
Ritor1
parents:
diff changeset
83 #define D3DPMISCCAPS_CULLCW 0x00000020L
Ritor1
parents:
diff changeset
84 #define D3DPMISCCAPS_CULLCCW 0x00000040L
Ritor1
parents:
diff changeset
85
Ritor1
parents:
diff changeset
86 /* D3DPRIMCAPS dwRasterCaps */
Ritor1
parents:
diff changeset
87
Ritor1
parents:
diff changeset
88 #define D3DPRASTERCAPS_DITHER 0x00000001L
Ritor1
parents:
diff changeset
89 #define D3DPRASTERCAPS_ROP2 0x00000002L
Ritor1
parents:
diff changeset
90 #define D3DPRASTERCAPS_XOR 0x00000004L
Ritor1
parents:
diff changeset
91 #define D3DPRASTERCAPS_PAT 0x00000008L
Ritor1
parents:
diff changeset
92 #define D3DPRASTERCAPS_ZTEST 0x00000010L
Ritor1
parents:
diff changeset
93 #define D3DPRASTERCAPS_SUBPIXEL 0x00000020L
Ritor1
parents:
diff changeset
94 #define D3DPRASTERCAPS_SUBPIXELX 0x00000040L
Ritor1
parents:
diff changeset
95 #define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
Ritor1
parents:
diff changeset
96 #define D3DPRASTERCAPS_FOGTABLE 0x00000100L
Ritor1
parents:
diff changeset
97 #define D3DPRASTERCAPS_STIPPLE 0x00000200L
Ritor1
parents:
diff changeset
98 #if(DIRECT3D_VERSION >= 0x0500)
Ritor1
parents:
diff changeset
99 #define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
Ritor1
parents:
diff changeset
100 #define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
Ritor1
parents:
diff changeset
101 #define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
Ritor1
parents:
diff changeset
102 #define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
Ritor1
parents:
diff changeset
103 #define D3DPRASTERCAPS_ZBIAS 0x00004000L
Ritor1
parents:
diff changeset
104 #define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
Ritor1
parents:
diff changeset
105 #define D3DPRASTERCAPS_FOGRANGE 0x00010000L
Ritor1
parents:
diff changeset
106 #define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
Ritor1
parents:
diff changeset
107 #endif /* DIRECT3D_VERSION >= 0x0500 */
Ritor1
parents:
diff changeset
108 #if(DIRECT3D_VERSION >= 0x0600)
Ritor1
parents:
diff changeset
109 #define D3DPRASTERCAPS_WBUFFER 0x00040000L
Ritor1
parents:
diff changeset
110 #define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L
Ritor1
parents:
diff changeset
111 #define D3DPRASTERCAPS_WFOG 0x00100000L
Ritor1
parents:
diff changeset
112 #define D3DPRASTERCAPS_ZFOG 0x00200000L
Ritor1
parents:
diff changeset
113 #endif /* DIRECT3D_VERSION >= 0x0600 */
Ritor1
parents:
diff changeset
114
Ritor1
parents:
diff changeset
115 /* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
Ritor1
parents:
diff changeset
116
Ritor1
parents:
diff changeset
117 #define D3DPCMPCAPS_NEVER 0x00000001L
Ritor1
parents:
diff changeset
118 #define D3DPCMPCAPS_LESS 0x00000002L
Ritor1
parents:
diff changeset
119 #define D3DPCMPCAPS_EQUAL 0x00000004L
Ritor1
parents:
diff changeset
120 #define D3DPCMPCAPS_LESSEQUAL 0x00000008L
Ritor1
parents:
diff changeset
121 #define D3DPCMPCAPS_GREATER 0x00000010L
Ritor1
parents:
diff changeset
122 #define D3DPCMPCAPS_NOTEQUAL 0x00000020L
Ritor1
parents:
diff changeset
123 #define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
Ritor1
parents:
diff changeset
124 #define D3DPCMPCAPS_ALWAYS 0x00000080L
Ritor1
parents:
diff changeset
125
Ritor1
parents:
diff changeset
126 /* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
Ritor1
parents:
diff changeset
127
Ritor1
parents:
diff changeset
128 #define D3DPBLENDCAPS_ZERO 0x00000001L
Ritor1
parents:
diff changeset
129 #define D3DPBLENDCAPS_ONE 0x00000002L
Ritor1
parents:
diff changeset
130 #define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
Ritor1
parents:
diff changeset
131 #define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
Ritor1
parents:
diff changeset
132 #define D3DPBLENDCAPS_SRCALPHA 0x00000010L
Ritor1
parents:
diff changeset
133 #define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
Ritor1
parents:
diff changeset
134 #define D3DPBLENDCAPS_DESTALPHA 0x00000040L
Ritor1
parents:
diff changeset
135 #define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
Ritor1
parents:
diff changeset
136 #define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
Ritor1
parents:
diff changeset
137 #define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
Ritor1
parents:
diff changeset
138 #define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
Ritor1
parents:
diff changeset
139 #define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
Ritor1
parents:
diff changeset
140 #define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
Ritor1
parents:
diff changeset
141
Ritor1
parents:
diff changeset
142 /* D3DPRIMCAPS dwShadeCaps */
Ritor1
parents:
diff changeset
143
Ritor1
parents:
diff changeset
144 #define D3DPSHADECAPS_COLORFLATMONO 0x00000001L
Ritor1
parents:
diff changeset
145 #define D3DPSHADECAPS_COLORFLATRGB 0x00000002L
Ritor1
parents:
diff changeset
146 #define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004L
Ritor1
parents:
diff changeset
147 #define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
Ritor1
parents:
diff changeset
148 #define D3DPSHADECAPS_COLORPHONGMONO 0x00000010L
Ritor1
parents:
diff changeset
149 #define D3DPSHADECAPS_COLORPHONGRGB 0x00000020L
Ritor1
parents:
diff changeset
150
Ritor1
parents:
diff changeset
151 #define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040L
Ritor1
parents:
diff changeset
152 #define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080L
Ritor1
parents:
diff changeset
153 #define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100L
Ritor1
parents:
diff changeset
154 #define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
Ritor1
parents:
diff changeset
155 #define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400L
Ritor1
parents:
diff changeset
156 #define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800L
Ritor1
parents:
diff changeset
157
Ritor1
parents:
diff changeset
158 #define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000L
Ritor1
parents:
diff changeset
159 #define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000L
Ritor1
parents:
diff changeset
160 #define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
Ritor1
parents:
diff changeset
161 #define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000L
Ritor1
parents:
diff changeset
162 #define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000L
Ritor1
parents:
diff changeset
163 #define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000L
Ritor1
parents:
diff changeset
164
Ritor1
parents:
diff changeset
165 #define D3DPSHADECAPS_FOGFLAT 0x00040000L
Ritor1
parents:
diff changeset
166 #define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
Ritor1
parents:
diff changeset
167 #define D3DPSHADECAPS_FOGPHONG 0x00100000L
Ritor1
parents:
diff changeset
168
Ritor1
parents:
diff changeset
169 /* D3DPRIMCAPS dwTextureCaps */
Ritor1
parents:
diff changeset
170
Ritor1
parents:
diff changeset
171 /*
Ritor1
parents:
diff changeset
172 * Perspective-correct texturing is supported
Ritor1
parents:
diff changeset
173 */
Ritor1
parents:
diff changeset
174 #define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
Ritor1
parents:
diff changeset
175
Ritor1
parents:
diff changeset
176 /*
Ritor1
parents:
diff changeset
177 * Power-of-2 texture dimensions are required
Ritor1
parents:
diff changeset
178 */
Ritor1
parents:
diff changeset
179 #define D3DPTEXTURECAPS_POW2 0x00000002L
Ritor1
parents:
diff changeset
180
Ritor1
parents:
diff changeset
181 /*
Ritor1
parents:
diff changeset
182 * Alpha in texture pixels is supported
Ritor1
parents:
diff changeset
183 */
Ritor1
parents:
diff changeset
184 #define D3DPTEXTURECAPS_ALPHA 0x00000004L
Ritor1
parents:
diff changeset
185
Ritor1
parents:
diff changeset
186 /*
Ritor1
parents:
diff changeset
187 * Color-keyed textures are supported
Ritor1
parents:
diff changeset
188 */
Ritor1
parents:
diff changeset
189 #define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
Ritor1
parents:
diff changeset
190
Ritor1
parents:
diff changeset
191 /*
Ritor1
parents:
diff changeset
192 * obsolete, see D3DPTADDRESSCAPS_BORDER
Ritor1
parents:
diff changeset
193 */
Ritor1
parents:
diff changeset
194 #define D3DPTEXTURECAPS_BORDER 0x00000010L
Ritor1
parents:
diff changeset
195
Ritor1
parents:
diff changeset
196 /*
Ritor1
parents:
diff changeset
197 * Only square textures are supported
Ritor1
parents:
diff changeset
198 */
Ritor1
parents:
diff changeset
199 #define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L
Ritor1
parents:
diff changeset
200
Ritor1
parents:
diff changeset
201 #if(DIRECT3D_VERSION >= 0x0600)
Ritor1
parents:
diff changeset
202 /*
Ritor1
parents:
diff changeset
203 * Texture indices are not scaled by the texture size prior
Ritor1
parents:
diff changeset
204 * to interpolation.
Ritor1
parents:
diff changeset
205 */
Ritor1
parents:
diff changeset
206 #define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
Ritor1
parents:
diff changeset
207
Ritor1
parents:
diff changeset
208 /*
Ritor1
parents:
diff changeset
209 * Device can draw alpha from texture palettes
Ritor1
parents:
diff changeset
210 */
Ritor1
parents:
diff changeset
211 #define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L
Ritor1
parents:
diff changeset
212
Ritor1
parents:
diff changeset
213 /*
Ritor1
parents:
diff changeset
214 * Device can use non-POW2 textures if:
Ritor1
parents:
diff changeset
215 * 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
Ritor1
parents:
diff changeset
216 * 2) D3DRS_WRAP(N) is zero for this texture's coordinates
Ritor1
parents:
diff changeset
217 * 3) mip mapping is not enabled (use magnification filter only)
Ritor1
parents:
diff changeset
218 */
Ritor1
parents:
diff changeset
219 #define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
Ritor1
parents:
diff changeset
220
Ritor1
parents:
diff changeset
221 #endif /* DIRECT3D_VERSION >= 0x0600 */
Ritor1
parents:
diff changeset
222 #if(DIRECT3D_VERSION >= 0x0700)
Ritor1
parents:
diff changeset
223
Ritor1
parents:
diff changeset
224 // 0x00000200L unused
Ritor1
parents:
diff changeset
225
Ritor1
parents:
diff changeset
226 /*
Ritor1
parents:
diff changeset
227 * Device can divide transformed texture coordinates by the
Ritor1
parents:
diff changeset
228 * COUNTth texture coordinate (can do D3DTTFF_PROJECTED)
Ritor1
parents:
diff changeset
229 */
Ritor1
parents:
diff changeset
230 #define D3DPTEXTURECAPS_PROJECTED 0x00000400L
Ritor1
parents:
diff changeset
231
Ritor1
parents:
diff changeset
232 /*
Ritor1
parents:
diff changeset
233 * Device can do cubemap textures
Ritor1
parents:
diff changeset
234 */
Ritor1
parents:
diff changeset
235 #define D3DPTEXTURECAPS_CUBEMAP 0x00000800L
Ritor1
parents:
diff changeset
236
Ritor1
parents:
diff changeset
237 #define D3DPTEXTURECAPS_COLORKEYBLEND 0x00001000L
Ritor1
parents:
diff changeset
238 #endif /* DIRECT3D_VERSION >= 0x0700 */
Ritor1
parents:
diff changeset
239
Ritor1
parents:
diff changeset
240 /* D3DPRIMCAPS dwTextureFilterCaps */
Ritor1
parents:
diff changeset
241
Ritor1
parents:
diff changeset
242 #define D3DPTFILTERCAPS_NEAREST 0x00000001L
Ritor1
parents:
diff changeset
243 #define D3DPTFILTERCAPS_LINEAR 0x00000002L
Ritor1
parents:
diff changeset
244 #define D3DPTFILTERCAPS_MIPNEAREST 0x00000004L
Ritor1
parents:
diff changeset
245 #define D3DPTFILTERCAPS_MIPLINEAR 0x00000008L
Ritor1
parents:
diff changeset
246 #define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010L
Ritor1
parents:
diff changeset
247 #define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020L
Ritor1
parents:
diff changeset
248
Ritor1
parents:
diff changeset
249 #if(DIRECT3D_VERSION >= 0x0600)
Ritor1
parents:
diff changeset
250 /* Device3 Min Filter */
Ritor1
parents:
diff changeset
251 #define D3DPTFILTERCAPS_MINFPOINT 0x00000100L
Ritor1
parents:
diff changeset
252 #define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
Ritor1
parents:
diff changeset
253 #define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
Ritor1
parents:
diff changeset
254
Ritor1
parents:
diff changeset
255 /* Device3 Mip Filter */
Ritor1
parents:
diff changeset
256 #define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L
Ritor1
parents:
diff changeset
257 #define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
Ritor1
parents:
diff changeset
258
Ritor1
parents:
diff changeset
259 /* Device3 Mag Filter */
Ritor1
parents:
diff changeset
260 #define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L
Ritor1
parents:
diff changeset
261 #define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
Ritor1
parents:
diff changeset
262 #define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
Ritor1
parents:
diff changeset
263 #define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L
Ritor1
parents:
diff changeset
264 #define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L
Ritor1
parents:
diff changeset
265 #endif /* DIRECT3D_VERSION >= 0x0600 */
Ritor1
parents:
diff changeset
266
Ritor1
parents:
diff changeset
267 /* D3DPRIMCAPS dwTextureBlendCaps */
Ritor1
parents:
diff changeset
268
Ritor1
parents:
diff changeset
269 #define D3DPTBLENDCAPS_DECAL 0x00000001L
Ritor1
parents:
diff changeset
270 #define D3DPTBLENDCAPS_MODULATE 0x00000002L
Ritor1
parents:
diff changeset
271 #define D3DPTBLENDCAPS_DECALALPHA 0x00000004L
Ritor1
parents:
diff changeset
272 #define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008L
Ritor1
parents:
diff changeset
273 #define D3DPTBLENDCAPS_DECALMASK 0x00000010L
Ritor1
parents:
diff changeset
274 #define D3DPTBLENDCAPS_MODULATEMASK 0x00000020L
Ritor1
parents:
diff changeset
275 #define D3DPTBLENDCAPS_COPY 0x00000040L
Ritor1
parents:
diff changeset
276 #if(DIRECT3D_VERSION >= 0x0500)
Ritor1
parents:
diff changeset
277 #define D3DPTBLENDCAPS_ADD 0x00000080L
Ritor1
parents:
diff changeset
278 #endif /* DIRECT3D_VERSION >= 0x0500 */
Ritor1
parents:
diff changeset
279
Ritor1
parents:
diff changeset
280 /* D3DPRIMCAPS dwTextureAddressCaps */
Ritor1
parents:
diff changeset
281 #define D3DPTADDRESSCAPS_WRAP 0x00000001L
Ritor1
parents:
diff changeset
282 #define D3DPTADDRESSCAPS_MIRROR 0x00000002L
Ritor1
parents:
diff changeset
283 #define D3DPTADDRESSCAPS_CLAMP 0x00000004L
Ritor1
parents:
diff changeset
284 #if(DIRECT3D_VERSION >= 0x0500)
Ritor1
parents:
diff changeset
285 #define D3DPTADDRESSCAPS_BORDER 0x00000008L
Ritor1
parents:
diff changeset
286 #define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
Ritor1
parents:
diff changeset
287 #endif /* DIRECT3D_VERSION >= 0x0500 */
Ritor1
parents:
diff changeset
288
Ritor1
parents:
diff changeset
289 #if(DIRECT3D_VERSION >= 0x0600)
Ritor1
parents:
diff changeset
290
Ritor1
parents:
diff changeset
291 /* D3DDEVICEDESC dwStencilCaps */
Ritor1
parents:
diff changeset
292
Ritor1
parents:
diff changeset
293 #define D3DSTENCILCAPS_KEEP 0x00000001L
Ritor1
parents:
diff changeset
294 #define D3DSTENCILCAPS_ZERO 0x00000002L
Ritor1
parents:
diff changeset
295 #define D3DSTENCILCAPS_REPLACE 0x00000004L
Ritor1
parents:
diff changeset
296 #define D3DSTENCILCAPS_INCRSAT 0x00000008L
Ritor1
parents:
diff changeset
297 #define D3DSTENCILCAPS_DECRSAT 0x00000010L
Ritor1
parents:
diff changeset
298 #define D3DSTENCILCAPS_INVERT 0x00000020L
Ritor1
parents:
diff changeset
299 #define D3DSTENCILCAPS_INCR 0x00000040L
Ritor1
parents:
diff changeset
300 #define D3DSTENCILCAPS_DECR 0x00000080L
Ritor1
parents:
diff changeset
301
Ritor1
parents:
diff changeset
302 /* D3DDEVICEDESC dwTextureOpCaps */
Ritor1
parents:
diff changeset
303
Ritor1
parents:
diff changeset
304 #define D3DTEXOPCAPS_DISABLE 0x00000001L
Ritor1
parents:
diff changeset
305 #define D3DTEXOPCAPS_SELECTARG1 0x00000002L
Ritor1
parents:
diff changeset
306 #define D3DTEXOPCAPS_SELECTARG2 0x00000004L
Ritor1
parents:
diff changeset
307 #define D3DTEXOPCAPS_MODULATE 0x00000008L
Ritor1
parents:
diff changeset
308 #define D3DTEXOPCAPS_MODULATE2X 0x00000010L
Ritor1
parents:
diff changeset
309 #define D3DTEXOPCAPS_MODULATE4X 0x00000020L
Ritor1
parents:
diff changeset
310 #define D3DTEXOPCAPS_ADD 0x00000040L
Ritor1
parents:
diff changeset
311 #define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
Ritor1
parents:
diff changeset
312 #define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
Ritor1
parents:
diff changeset
313 #define D3DTEXOPCAPS_SUBTRACT 0x00000200L
Ritor1
parents:
diff changeset
314 #define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
Ritor1
parents:
diff changeset
315 #define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
Ritor1
parents:
diff changeset
316 #define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
Ritor1
parents:
diff changeset
317 #define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
Ritor1
parents:
diff changeset
318 #define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
Ritor1
parents:
diff changeset
319 #define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
Ritor1
parents:
diff changeset
320 #define D3DTEXOPCAPS_PREMODULATE 0x00010000L
Ritor1
parents:
diff changeset
321 #define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
Ritor1
parents:
diff changeset
322 #define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
Ritor1
parents:
diff changeset
323 #define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
Ritor1
parents:
diff changeset
324 #define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
Ritor1
parents:
diff changeset
325 #define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
Ritor1
parents:
diff changeset
326 #define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
Ritor1
parents:
diff changeset
327 #define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
Ritor1
parents:
diff changeset
328
Ritor1
parents:
diff changeset
329 /* D3DDEVICEDESC dwFVFCaps flags */
Ritor1
parents:
diff changeset
330
Ritor1
parents:
diff changeset
331 #define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
Ritor1
parents:
diff changeset
332 #define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
Ritor1
parents:
diff changeset
333
Ritor1
parents:
diff changeset
334 #endif /* DIRECT3D_VERSION >= 0x0600 */
Ritor1
parents:
diff changeset
335
Ritor1
parents:
diff changeset
336 /*
Ritor1
parents:
diff changeset
337 * Description for a device.
Ritor1
parents:
diff changeset
338 * This is used to describe a device that is to be created or to query
Ritor1
parents:
diff changeset
339 * the current device.
Ritor1
parents:
diff changeset
340 */
Ritor1
parents:
diff changeset
341 typedef struct _D3DDeviceDesc {
Ritor1
parents:
diff changeset
342 DWORD dwSize; /* Size of D3DDEVICEDESC structure */
Ritor1
parents:
diff changeset
343 DWORD dwFlags; /* Indicates which fields have valid data */
Ritor1
parents:
diff changeset
344 D3DCOLORMODEL dcmColorModel; /* Color model of device */
Ritor1
parents:
diff changeset
345 DWORD dwDevCaps; /* Capabilities of device */
Ritor1
parents:
diff changeset
346 D3DTRANSFORMCAPS dtcTransformCaps; /* Capabilities of transform */
Ritor1
parents:
diff changeset
347 BOOL bClipping; /* Device can do 3D clipping */
Ritor1
parents:
diff changeset
348 D3DLIGHTINGCAPS dlcLightingCaps; /* Capabilities of lighting */
Ritor1
parents:
diff changeset
349 D3DPRIMCAPS dpcLineCaps;
Ritor1
parents:
diff changeset
350 D3DPRIMCAPS dpcTriCaps;
Ritor1
parents:
diff changeset
351 DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
Ritor1
parents:
diff changeset
352 DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
Ritor1
parents:
diff changeset
353 DWORD dwMaxBufferSize; /* Maximum execute buffer size */
Ritor1
parents:
diff changeset
354 DWORD dwMaxVertexCount; /* Maximum vertex count */
Ritor1
parents:
diff changeset
355 #if(DIRECT3D_VERSION >= 0x0500)
Ritor1
parents:
diff changeset
356 // *** New fields for DX5 *** //
Ritor1
parents:
diff changeset
357
Ritor1
parents:
diff changeset
358 // Width and height caps are 0 for legacy HALs.
Ritor1
parents:
diff changeset
359 DWORD dwMinTextureWidth, dwMinTextureHeight;
Ritor1
parents:
diff changeset
360 DWORD dwMaxTextureWidth, dwMaxTextureHeight;
Ritor1
parents:
diff changeset
361 DWORD dwMinStippleWidth, dwMaxStippleWidth;
Ritor1
parents:
diff changeset
362 DWORD dwMinStippleHeight, dwMaxStippleHeight;
Ritor1
parents:
diff changeset
363 #endif /* DIRECT3D_VERSION >= 0x0500 */
Ritor1
parents:
diff changeset
364
Ritor1
parents:
diff changeset
365 #if(DIRECT3D_VERSION >= 0x0600)
Ritor1
parents:
diff changeset
366 // New fields for DX6
Ritor1
parents:
diff changeset
367 DWORD dwMaxTextureRepeat;
Ritor1
parents:
diff changeset
368 DWORD dwMaxTextureAspectRatio;
Ritor1
parents:
diff changeset
369 DWORD dwMaxAnisotropy;
Ritor1
parents:
diff changeset
370
Ritor1
parents:
diff changeset
371 // Guard band that the rasterizer can accommodate
Ritor1
parents:
diff changeset
372 // Screen-space vertices inside this space but outside the OldViewport
Ritor1
parents:
diff changeset
373 // will get clipped properly.
Ritor1
parents:
diff changeset
374 D3DVALUE dvGuardBandLeft;
Ritor1
parents:
diff changeset
375 D3DVALUE dvGuardBandTop;
Ritor1
parents:
diff changeset
376 D3DVALUE dvGuardBandRight;
Ritor1
parents:
diff changeset
377 D3DVALUE dvGuardBandBottom;
Ritor1
parents:
diff changeset
378
Ritor1
parents:
diff changeset
379 D3DVALUE dvExtentsAdjust;
Ritor1
parents:
diff changeset
380 DWORD dwStencilCaps;
Ritor1
parents:
diff changeset
381
Ritor1
parents:
diff changeset
382 DWORD dwFVFCaps;
Ritor1
parents:
diff changeset
383 DWORD dwTextureOpCaps;
Ritor1
parents:
diff changeset
384 WORD wMaxTextureBlendStages;
Ritor1
parents:
diff changeset
385 WORD wMaxSimultaneousTextures;
Ritor1
parents:
diff changeset
386 #endif /* DIRECT3D_VERSION >= 0x0600 */
Ritor1
parents:
diff changeset
387 } D3DDEVICEDESC, *LPD3DDEVICEDESC;
Ritor1
parents:
diff changeset
388
Ritor1
parents:
diff changeset
389 #if(DIRECT3D_VERSION >= 0x0700)
Ritor1
parents:
diff changeset
390 typedef struct _D3DDeviceDesc7 {
Ritor1
parents:
diff changeset
391 DWORD dwDevCaps; /* Capabilities of device */
Ritor1
parents:
diff changeset
392 D3DPRIMCAPS dpcLineCaps;
Ritor1
parents:
diff changeset
393 D3DPRIMCAPS dpcTriCaps;
Ritor1
parents:
diff changeset
394 DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
Ritor1
parents:
diff changeset
395 DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
Ritor1
parents:
diff changeset
396
Ritor1
parents:
diff changeset
397 DWORD dwMinTextureWidth, dwMinTextureHeight;
Ritor1
parents:
diff changeset
398 DWORD dwMaxTextureWidth, dwMaxTextureHeight;
Ritor1
parents:
diff changeset
399
Ritor1
parents:
diff changeset
400 DWORD dwMaxTextureRepeat;
Ritor1
parents:
diff changeset
401 DWORD dwMaxTextureAspectRatio;
Ritor1
parents:
diff changeset
402 DWORD dwMaxAnisotropy;
Ritor1
parents:
diff changeset
403
Ritor1
parents:
diff changeset
404 D3DVALUE dvGuardBandLeft;
Ritor1
parents:
diff changeset
405 D3DVALUE dvGuardBandTop;
Ritor1
parents:
diff changeset
406 D3DVALUE dvGuardBandRight;
Ritor1
parents:
diff changeset
407 D3DVALUE dvGuardBandBottom;
Ritor1
parents:
diff changeset
408
Ritor1
parents:
diff changeset
409 D3DVALUE dvExtentsAdjust;
Ritor1
parents:
diff changeset
410 DWORD dwStencilCaps;
Ritor1
parents:
diff changeset
411
Ritor1
parents:
diff changeset
412 DWORD dwFVFCaps;
Ritor1
parents:
diff changeset
413 DWORD dwTextureOpCaps;
Ritor1
parents:
diff changeset
414 WORD wMaxTextureBlendStages;
Ritor1
parents:
diff changeset
415 WORD wMaxSimultaneousTextures;
Ritor1
parents:
diff changeset
416
Ritor1
parents:
diff changeset
417 DWORD dwMaxActiveLights;
Ritor1
parents:
diff changeset
418 D3DVALUE dvMaxVertexW;
Ritor1
parents:
diff changeset
419 GUID deviceGUID;
Ritor1
parents:
diff changeset
420
Ritor1
parents:
diff changeset
421 WORD wMaxUserClipPlanes;
Ritor1
parents:
diff changeset
422 WORD wMaxVertexBlendMatrices;
Ritor1
parents:
diff changeset
423
Ritor1
parents:
diff changeset
424 DWORD dwVertexProcessingCaps;
Ritor1
parents:
diff changeset
425
Ritor1
parents:
diff changeset
426 DWORD dwReserved1;
Ritor1
parents:
diff changeset
427 DWORD dwReserved2;
Ritor1
parents:
diff changeset
428 DWORD dwReserved3;
Ritor1
parents:
diff changeset
429 DWORD dwReserved4;
Ritor1
parents:
diff changeset
430 } D3DDEVICEDESC7, *LPD3DDEVICEDESC7;
Ritor1
parents:
diff changeset
431 #endif /* DIRECT3D_VERSION >= 0x0700 */
Ritor1
parents:
diff changeset
432
Ritor1
parents:
diff changeset
433 #define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC))
Ritor1
parents:
diff changeset
434 #define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7))
Ritor1
parents:
diff changeset
435
Ritor1
parents:
diff changeset
436 typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(GUID FAR *lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
Ritor1
parents:
diff changeset
437
Ritor1
parents:
diff changeset
438 #if(DIRECT3D_VERSION >= 0x0700)
Ritor1
parents:
diff changeset
439 typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID);
Ritor1
parents:
diff changeset
440 #endif /* DIRECT3D_VERSION >= 0x0700 */
Ritor1
parents:
diff changeset
441
Ritor1
parents:
diff changeset
442 /* D3DDEVICEDESC dwFlags indicating valid fields */
Ritor1
parents:
diff changeset
443
Ritor1
parents:
diff changeset
444 #define D3DDD_COLORMODEL 0x00000001L /* dcmColorModel is valid */
Ritor1
parents:
diff changeset
445 #define D3DDD_DEVCAPS 0x00000002L /* dwDevCaps is valid */
Ritor1
parents:
diff changeset
446 #define D3DDD_TRANSFORMCAPS 0x00000004L /* dtcTransformCaps is valid */
Ritor1
parents:
diff changeset
447 #define D3DDD_LIGHTINGCAPS 0x00000008L /* dlcLightingCaps is valid */
Ritor1
parents:
diff changeset
448 #define D3DDD_BCLIPPING 0x00000010L /* bClipping is valid */
Ritor1
parents:
diff changeset
449 #define D3DDD_LINECAPS 0x00000020L /* dpcLineCaps is valid */
Ritor1
parents:
diff changeset
450 #define D3DDD_TRICAPS 0x00000040L /* dpcTriCaps is valid */
Ritor1
parents:
diff changeset
451 #define D3DDD_DEVICERENDERBITDEPTH 0x00000080L /* dwDeviceRenderBitDepth is valid */
Ritor1
parents:
diff changeset
452 #define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100L /* dwDeviceZBufferBitDepth is valid */
Ritor1
parents:
diff changeset
453 #define D3DDD_MAXBUFFERSIZE 0x00000200L /* dwMaxBufferSize is valid */
Ritor1
parents:
diff changeset
454 #define D3DDD_MAXVERTEXCOUNT 0x00000400L /* dwMaxVertexCount is valid */
Ritor1
parents:
diff changeset
455
Ritor1
parents:
diff changeset
456 /* D3DDEVICEDESC dwDevCaps flags */
Ritor1
parents:
diff changeset
457
Ritor1
parents:
diff changeset
458 #define D3DDEVCAPS_FLOATTLVERTEX 0x00000001L /* Device accepts floating point */
Ritor1
parents:
diff changeset
459 /* for post-transform vertex data */
Ritor1
parents:
diff changeset
460 #define D3DDEVCAPS_SORTINCREASINGZ 0x00000002L /* Device needs data sorted for increasing Z */
Ritor1
parents:
diff changeset
461 #define D3DDEVCAPS_SORTDECREASINGZ 0X00000004L /* Device needs data sorted for decreasing Z */
Ritor1
parents:
diff changeset
462 #define D3DDEVCAPS_SORTEXACT 0x00000008L /* Device needs data sorted exactly */
Ritor1
parents:
diff changeset
463
Ritor1
parents:
diff changeset
464 #define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
Ritor1
parents:
diff changeset
465 #define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
Ritor1
parents:
diff changeset
466 #define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
Ritor1
parents:
diff changeset
467 #define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
Ritor1
parents:
diff changeset
468 #define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
Ritor1
parents:
diff changeset
469 #define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
Ritor1
parents:
diff changeset
470 #if(DIRECT3D_VERSION >= 0x0500)
Ritor1
parents:
diff changeset
471 #define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
Ritor1
parents:
diff changeset
472 #define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
Ritor1
parents:
diff changeset
473 #define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
Ritor1
parents:
diff changeset
474 #endif /* DIRECT3D_VERSION >= 0x0500 */
Ritor1
parents:
diff changeset
475 #if(DIRECT3D_VERSION >= 0x0600)
Ritor1
parents:
diff changeset
476 #define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
Ritor1
parents:
diff changeset
477 #define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
Ritor1
parents:
diff changeset
478 #define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
Ritor1
parents:
diff changeset
479 #endif /* DIRECT3D_VERSION >= 0x0600 */
Ritor1
parents:
diff changeset
480 #if(DIRECT3D_VERSION >= 0x0700)
Ritor1
parents:
diff changeset
481 #define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
Ritor1
parents:
diff changeset
482 #define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
Ritor1
parents:
diff changeset
483 #define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
Ritor1
parents:
diff changeset
484
Ritor1
parents:
diff changeset
485 /*
Ritor1
parents:
diff changeset
486 * These are the flags in the D3DDEVICEDESC7.dwVertexProcessingCaps field
Ritor1
parents:
diff changeset
487 */
Ritor1
parents:
diff changeset
488
Ritor1
parents:
diff changeset
489 /* device can do texgen */
Ritor1
parents:
diff changeset
490 #define D3DVTXPCAPS_TEXGEN 0x00000001L
Ritor1
parents:
diff changeset
491 /* device can do IDirect3DDevice7 colormaterialsource ops */
Ritor1
parents:
diff changeset
492 #define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L
Ritor1
parents:
diff changeset
493 /* device can do vertex fog */
Ritor1
parents:
diff changeset
494 #define D3DVTXPCAPS_VERTEXFOG 0x00000004L
Ritor1
parents:
diff changeset
495 /* device can do directional lights */
Ritor1
parents:
diff changeset
496 #define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L
Ritor1
parents:
diff changeset
497 /* device can do positional lights (includes point and spot) */
Ritor1
parents:
diff changeset
498 #define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L
Ritor1
parents:
diff changeset
499 /* device can do local viewer */
Ritor1
parents:
diff changeset
500 #define D3DVTXPCAPS_LOCALVIEWER 0x00000020L
Ritor1
parents:
diff changeset
501
Ritor1
parents:
diff changeset
502 #endif /* DIRECT3D_VERSION >= 0x0700 */
Ritor1
parents:
diff changeset
503
Ritor1
parents:
diff changeset
504 #define D3DFDS_COLORMODEL 0x00000001L /* Match color model */
Ritor1
parents:
diff changeset
505 #define D3DFDS_GUID 0x00000002L /* Match guid */
Ritor1
parents:
diff changeset
506 #define D3DFDS_HARDWARE 0x00000004L /* Match hardware/software */
Ritor1
parents:
diff changeset
507 #define D3DFDS_TRIANGLES 0x00000008L /* Match in triCaps */
Ritor1
parents:
diff changeset
508 #define D3DFDS_LINES 0x00000010L /* Match in lineCaps */
Ritor1
parents:
diff changeset
509 #define D3DFDS_MISCCAPS 0x00000020L /* Match primCaps.dwMiscCaps */
Ritor1
parents:
diff changeset
510 #define D3DFDS_RASTERCAPS 0x00000040L /* Match primCaps.dwRasterCaps */
Ritor1
parents:
diff changeset
511 #define D3DFDS_ZCMPCAPS 0x00000080L /* Match primCaps.dwZCmpCaps */
Ritor1
parents:
diff changeset
512 #define D3DFDS_ALPHACMPCAPS 0x00000100L /* Match primCaps.dwAlphaCmpCaps */
Ritor1
parents:
diff changeset
513 #define D3DFDS_SRCBLENDCAPS 0x00000200L /* Match primCaps.dwSourceBlendCaps */
Ritor1
parents:
diff changeset
514 #define D3DFDS_DSTBLENDCAPS 0x00000400L /* Match primCaps.dwDestBlendCaps */
Ritor1
parents:
diff changeset
515 #define D3DFDS_SHADECAPS 0x00000800L /* Match primCaps.dwShadeCaps */
Ritor1
parents:
diff changeset
516 #define D3DFDS_TEXTURECAPS 0x00001000L /* Match primCaps.dwTextureCaps */
Ritor1
parents:
diff changeset
517 #define D3DFDS_TEXTUREFILTERCAPS 0x00002000L /* Match primCaps.dwTextureFilterCaps */
Ritor1
parents:
diff changeset
518 #define D3DFDS_TEXTUREBLENDCAPS 0x00004000L /* Match primCaps.dwTextureBlendCaps */
Ritor1
parents:
diff changeset
519 #define D3DFDS_TEXTUREADDRESSCAPS 0x00008000L /* Match primCaps.dwTextureBlendCaps */
Ritor1
parents:
diff changeset
520
Ritor1
parents:
diff changeset
521 /*
Ritor1
parents:
diff changeset
522 * FindDevice arguments
Ritor1
parents:
diff changeset
523 */
Ritor1
parents:
diff changeset
524 typedef struct _D3DFINDDEVICESEARCH {
Ritor1
parents:
diff changeset
525 DWORD dwSize;
Ritor1
parents:
diff changeset
526 DWORD dwFlags;
Ritor1
parents:
diff changeset
527 BOOL bHardware;
Ritor1
parents:
diff changeset
528 D3DCOLORMODEL dcmColorModel;
Ritor1
parents:
diff changeset
529 GUID guid;
Ritor1
parents:
diff changeset
530 DWORD dwCaps;
Ritor1
parents:
diff changeset
531 D3DPRIMCAPS dpcPrimCaps;
Ritor1
parents:
diff changeset
532 } D3DFINDDEVICESEARCH, *LPD3DFINDDEVICESEARCH;
Ritor1
parents:
diff changeset
533
Ritor1
parents:
diff changeset
534 typedef struct _D3DFINDDEVICERESULT {
Ritor1
parents:
diff changeset
535 DWORD dwSize;
Ritor1
parents:
diff changeset
536 GUID guid; /* guid which matched */
Ritor1
parents:
diff changeset
537 D3DDEVICEDESC ddHwDesc; /* hardware D3DDEVICEDESC */
Ritor1
parents:
diff changeset
538 D3DDEVICEDESC ddSwDesc; /* software D3DDEVICEDESC */
Ritor1
parents:
diff changeset
539 } D3DFINDDEVICERESULT, *LPD3DFINDDEVICERESULT;
Ritor1
parents:
diff changeset
540
Ritor1
parents:
diff changeset
541 /*
Ritor1
parents:
diff changeset
542 * Description of execute buffer.
Ritor1
parents:
diff changeset
543 */
Ritor1
parents:
diff changeset
544 typedef struct _D3DExecuteBufferDesc {
Ritor1
parents:
diff changeset
545 DWORD dwSize; /* size of this structure */
Ritor1
parents:
diff changeset
546 DWORD dwFlags; /* flags indicating which fields are valid */
Ritor1
parents:
diff changeset
547 DWORD dwCaps; /* capabilities of execute buffer */
Ritor1
parents:
diff changeset
548 DWORD dwBufferSize; /* size of execute buffer data */
Ritor1
parents:
diff changeset
549 LPVOID lpData; /* pointer to actual data */
Ritor1
parents:
diff changeset
550 } D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
Ritor1
parents:
diff changeset
551
Ritor1
parents:
diff changeset
552 /* D3DEXECUTEBUFFER dwFlags indicating valid fields */
Ritor1
parents:
diff changeset
553
Ritor1
parents:
diff changeset
554 #define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
Ritor1
parents:
diff changeset
555 #define D3DDEB_CAPS 0x00000002l /* caps valid */
Ritor1
parents:
diff changeset
556 #define D3DDEB_LPDATA 0x00000004l /* lpData valid */
Ritor1
parents:
diff changeset
557
Ritor1
parents:
diff changeset
558 /* D3DEXECUTEBUFFER dwCaps */
Ritor1
parents:
diff changeset
559
Ritor1
parents:
diff changeset
560 #define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
Ritor1
parents:
diff changeset
561 #define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
Ritor1
parents:
diff changeset
562 #define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
Ritor1
parents:
diff changeset
563
Ritor1
parents:
diff changeset
564 #if(DIRECT3D_VERSION < 0x0800)
Ritor1
parents:
diff changeset
565
Ritor1
parents:
diff changeset
566 #if(DIRECT3D_VERSION >= 0x0700)
Ritor1
parents:
diff changeset
567 typedef struct _D3DDEVINFO_TEXTUREMANAGER {
Ritor1
parents:
diff changeset
568 BOOL bThrashing; /* indicates if thrashing */
Ritor1
parents:
diff changeset
569 DWORD dwApproxBytesDownloaded; /* Approximate number of bytes downloaded by texture manager */
Ritor1
parents:
diff changeset
570 DWORD dwNumEvicts; /* number of textures evicted */
Ritor1
parents:
diff changeset
571 DWORD dwNumVidCreates; /* number of textures created in video memory */
Ritor1
parents:
diff changeset
572 DWORD dwNumTexturesUsed; /* number of textures used */
Ritor1
parents:
diff changeset
573 DWORD dwNumUsedTexInVid; /* number of used textures present in video memory */
Ritor1
parents:
diff changeset
574 DWORD dwWorkingSet; /* number of textures in video memory */
Ritor1
parents:
diff changeset
575 DWORD dwWorkingSetBytes; /* number of bytes in video memory */
Ritor1
parents:
diff changeset
576 DWORD dwTotalManaged; /* total number of managed textures */
Ritor1
parents:
diff changeset
577 DWORD dwTotalBytes; /* total number of bytes of managed textures */
Ritor1
parents:
diff changeset
578 DWORD dwLastPri; /* priority of last texture evicted */
Ritor1
parents:
diff changeset
579 } D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER;
Ritor1
parents:
diff changeset
580
Ritor1
parents:
diff changeset
581 typedef struct _D3DDEVINFO_TEXTURING {
Ritor1
parents:
diff changeset
582 DWORD dwNumLoads; /* counts Load() API calls */
Ritor1
parents:
diff changeset
583 DWORD dwApproxBytesLoaded; /* Approximate number bytes loaded via Load() */
Ritor1
parents:
diff changeset
584 DWORD dwNumPreLoads; /* counts PreLoad() API calls */
Ritor1
parents:
diff changeset
585 DWORD dwNumSet; /* counts SetTexture() API calls */
Ritor1
parents:
diff changeset
586 DWORD dwNumCreates; /* counts texture creates */
Ritor1
parents:
diff changeset
587 DWORD dwNumDestroys; /* counts texture destroys */
Ritor1
parents:
diff changeset
588 DWORD dwNumSetPriorities; /* counts SetPriority() API calls */
Ritor1
parents:
diff changeset
589 DWORD dwNumSetLODs; /* counts SetLOD() API calls */
Ritor1
parents:
diff changeset
590 DWORD dwNumLocks; /* counts number of texture locks */
Ritor1
parents:
diff changeset
591 DWORD dwNumGetDCs; /* counts number of GetDCs to textures */
Ritor1
parents:
diff changeset
592 } D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING;
Ritor1
parents:
diff changeset
593 #endif /* DIRECT3D_VERSION >= 0x0700 */
Ritor1
parents:
diff changeset
594
Ritor1
parents:
diff changeset
595 #endif //(DIRECT3D_VERSION < 0x0800)
Ritor1
parents:
diff changeset
596
Ritor1
parents:
diff changeset
597 #pragma pack()
Ritor1
parents:
diff changeset
598
Ritor1
parents:
diff changeset
599
Ritor1
parents:
diff changeset
600 #endif /* _D3DCAPS_H_ */
Ritor1
parents:
diff changeset
601