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