configure: Add possibility to exclude some directories from the generated lists.
[wine.git] / include / wine / wined3d_types.h
blobbf35b9fc8dc1ad12299e4c04d113dc35b708a77b
1 /*
2 * Direct3D wine types include file
4 * Copyright 2002-2003 The wine-d3d team
5 * Copyright 2002-2003 Jason Edmeades
6 * Raphael Junqueira
7 * Copyright 2005 Oliver Stieber
8 * Copyright 2006 Stefan Dösinger
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #ifndef __WINE_WINED3D_TYPES_H
26 #define __WINE_WINED3D_TYPES_H
28 typedef DWORD WINED3DCOLOR;
30 typedef enum _WINED3DLIGHTTYPE {
31 WINED3DLIGHT_POINT = 1,
32 WINED3DLIGHT_SPOT = 2,
33 WINED3DLIGHT_DIRECTIONAL = 3,
34 WINED3DLIGHT_PARALLELPOINT = 4, /* D3D7 */
35 WINED3DLIGHT_GLSPOT = 5, /* D3D7 */
36 WINED3DLIGHT_FORCE_DWORD = 0x7fffffff
37 } WINED3DLIGHTTYPE;
39 typedef enum _WINED3DPRIMITIVETYPE {
40 WINED3DPT_POINTLIST = 1,
41 WINED3DPT_LINELIST = 2,
42 WINED3DPT_LINESTRIP = 3,
43 WINED3DPT_TRIANGLELIST = 4,
44 WINED3DPT_TRIANGLESTRIP = 5,
45 WINED3DPT_TRIANGLEFAN = 6,
47 WINED3DPT_FORCE_DWORD = 0x7fffffff
48 } WINED3DPRIMITIVETYPE;
50 typedef struct _WINED3DCOLORVALUE {
51 float r;
52 float g;
53 float b;
54 float a;
55 } WINED3DCOLORVALUE;
57 typedef struct _WINED3DVECTOR {
58 float x;
59 float y;
60 float z;
61 } WINED3DVECTOR;
63 typedef struct _WINED3DMATRIX {
64 union {
65 struct {
66 float _11, _12, _13, _14;
67 float _21, _22, _23, _24;
68 float _31, _32, _33, _34;
69 float _41, _42, _43, _44;
70 } DUMMYSTRUCTNAME;
71 float m[4][4];
72 } DUMMYUNIONNAME;
73 } WINED3DMATRIX;
75 typedef struct _WINED3DRECT {
76 LONG x1;
77 LONG y1;
78 LONG x2;
79 LONG y2;
80 } WINED3DRECT;
82 typedef struct _WINED3DLIGHT {
83 WINED3DLIGHTTYPE Type;
84 WINED3DCOLORVALUE Diffuse;
85 WINED3DCOLORVALUE Specular;
86 WINED3DCOLORVALUE Ambient;
87 WINED3DVECTOR Position;
88 WINED3DVECTOR Direction;
89 float Range;
90 float Falloff;
91 float Attenuation0;
92 float Attenuation1;
93 float Attenuation2;
94 float Theta;
95 float Phi;
96 } WINED3DLIGHT;
98 typedef struct _WINED3DMATERIAL {
99 WINED3DCOLORVALUE Diffuse;
100 WINED3DCOLORVALUE Ambient;
101 WINED3DCOLORVALUE Specular;
102 WINED3DCOLORVALUE Emissive;
103 float Power;
104 } WINED3DMATERIAL;
106 typedef struct _WINED3DVIEWPORT {
107 DWORD X;
108 DWORD Y;
109 DWORD Width;
110 DWORD Height;
111 float MinZ;
112 float MaxZ;
113 } WINED3DVIEWPORT;
115 typedef struct _WINED3DGAMMARAMP {
116 WORD red [256];
117 WORD green[256];
118 WORD blue [256];
119 } WINED3DGAMMARAMP;
121 typedef struct _WINED3DLINEPATTERN {
122 WORD wRepeatFactor;
123 WORD wLinePattern;
124 } WINED3DLINEPATTERN;
126 #define WINED3D_VSHADER_MAX_CONSTANTS 96
127 #define WINED3D_PSHADER_MAX_CONSTANTS 32
129 typedef struct _WINED3DVECTOR_3 {
130 float x;
131 float y;
132 float z;
133 } WINED3DVECTOR_3;
135 typedef struct _WINED3DVECTOR_4 {
136 float x;
137 float y;
138 float z;
139 float w;
140 } WINED3DVECTOR_4;
142 typedef struct WINED3DSHADERVECTOR {
143 float x;
144 float y;
145 float z;
146 float w;
147 } WINED3DSHADERVECTOR;
149 typedef struct WINED3DSHADERSCALAR {
150 float x;
151 } WINED3DSHADERSCALAR;
153 typedef WINED3DSHADERVECTOR WINEVSHADERCONSTANTS8[WINED3D_VSHADER_MAX_CONSTANTS];
155 typedef struct VSHADERDATA {
156 /** Run Time Shader Function Constants */
157 /*D3DXBUFFER* constants;*/
158 WINEVSHADERCONSTANTS8 C;
159 /** Shader Code as char ... */
160 CONST DWORD* code;
161 UINT codeLength;
162 } VSHADERDATA;
164 /** temporary here waiting for buffer code */
165 typedef struct VSHADERINPUTDATA {
166 WINED3DSHADERVECTOR V[17];
167 } WINEVSHADERINPUTDATA;
169 /** temporary here waiting for buffer code */
170 typedef struct VSHADEROUTPUTDATA {
171 WINED3DSHADERVECTOR oPos;
172 WINED3DSHADERVECTOR oD[2];
173 WINED3DSHADERVECTOR oT[8];
174 WINED3DSHADERVECTOR oFog;
175 WINED3DSHADERVECTOR oPts;
176 } WINEVSHADEROUTPUTDATA;
178 typedef WINED3DSHADERVECTOR WINEPSHADERCONSTANTS8[WINED3D_PSHADER_MAX_CONSTANTS];
180 typedef struct PSHADERDATA {
181 /** Run Time Shader Function Constants */
182 /*D3DXBUFFER* constants;*/
183 WINEPSHADERCONSTANTS8 C;
184 /** Shader Code as char ... */
185 CONST DWORD* code;
186 UINT codeLength;
187 } PSHADERDATA;
189 /** temporary here waiting for buffer code */
190 typedef struct PSHADERINPUTDATA {
191 WINED3DSHADERVECTOR V[2];
192 WINED3DSHADERVECTOR T[8];
193 WINED3DSHADERVECTOR S[16];
194 /*D3DSHADERVECTOR R[12];*/
195 } WINEPSHADERINPUTDATA;
197 /** temporary here waiting for buffer code */
198 typedef struct PSHADEROUTPUTDATA {
199 WINED3DSHADERVECTOR oC[4];
200 WINED3DSHADERVECTOR oDepth;
201 } WINEPSHADEROUTPUTDATA;
203 /*****************************************************************************
204 * WineD3D Structures to be used when d3d8 and d3d9 are incompatible
208 typedef enum _WINED3DDEVTYPE {
209 WINED3DDEVTYPE_HAL = 1,
210 WINED3DDEVTYPE_REF = 2,
211 WINED3DDEVTYPE_SW = 3,
212 WINED3DDEVTYPE_NULLREF = 4,
214 WINED3DDEVTYPE_FORCE_DWORD = 0xffffffff
215 } WINED3DDEVTYPE;
217 typedef enum _WINED3DDEGREETYPE {
218 WINED3DDEGREE_LINEAR = 1,
219 WINED3DDEGREE_QUADRATIC = 2,
220 WINED3DDEGREE_CUBIC = 3,
221 WINED3DDEGREE_QUINTIC = 5,
223 WINED3DDEGREE_FORCE_DWORD = 0x7fffffff
224 } WINED3DDEGREETYPE;
226 #define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \
227 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
228 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
230 typedef enum _WINED3DFORMAT {
231 WINED3DFMT_UNKNOWN = 0,
233 WINED3DFMT_R8G8B8 = 20,
234 WINED3DFMT_A8R8G8B8 = 21,
235 WINED3DFMT_X8R8G8B8 = 22,
236 WINED3DFMT_R5G6B5 = 23,
237 WINED3DFMT_X1R5G5B5 = 24,
238 WINED3DFMT_A1R5G5B5 = 25,
239 WINED3DFMT_A4R4G4B4 = 26,
240 WINED3DFMT_R3G3B2 = 27,
241 WINED3DFMT_A8 = 28,
242 WINED3DFMT_A8R3G3B2 = 29,
243 WINED3DFMT_X4R4G4B4 = 30,
244 WINED3DFMT_A2B10G10R10 = 31,
245 WINED3DFMT_A8B8G8R8 = 32,
246 WINED3DFMT_X8B8G8R8 = 33,
247 WINED3DFMT_G16R16 = 34,
248 WINED3DFMT_A2R10G10B10 = 35,
249 WINED3DFMT_A16B16G16R16 = 36,
252 WINED3DFMT_A8P8 = 40,
253 WINED3DFMT_P8 = 41,
255 WINED3DFMT_L8 = 50,
256 WINED3DFMT_A8L8 = 51,
257 WINED3DFMT_A4L4 = 52,
259 WINED3DFMT_V8U8 = 60,
260 WINED3DFMT_L6V5U5 = 61,
261 WINED3DFMT_X8L8V8U8 = 62,
262 WINED3DFMT_Q8W8V8U8 = 63,
263 WINED3DFMT_V16U16 = 64,
264 WINED3DFMT_W11V11U10 = 65,
265 WINED3DFMT_A2W10V10U10 = 67,
267 WINED3DFMT_UYVY = WINEMAKEFOURCC('U', 'Y', 'V', 'Y'),
268 WINED3DFMT_YUY2 = WINEMAKEFOURCC('Y', 'U', 'Y', '2'),
269 WINED3DFMT_YV12 = WINEMAKEFOURCC('Y', 'V', '1', '2'),
270 WINED3DFMT_DXT1 = WINEMAKEFOURCC('D', 'X', 'T', '1'),
271 WINED3DFMT_DXT2 = WINEMAKEFOURCC('D', 'X', 'T', '2'),
272 WINED3DFMT_DXT3 = WINEMAKEFOURCC('D', 'X', 'T', '3'),
273 WINED3DFMT_DXT4 = WINEMAKEFOURCC('D', 'X', 'T', '4'),
274 WINED3DFMT_DXT5 = WINEMAKEFOURCC('D', 'X', 'T', '5'),
275 WINED3DFMT_MULTI2_ARGB8 = WINEMAKEFOURCC('M', 'E', 'T', '1'),
276 WINED3DFMT_G8R8_G8B8 = WINEMAKEFOURCC('G', 'R', 'G', 'B'),
277 WINED3DFMT_R8G8_B8G8 = WINEMAKEFOURCC('R', 'G', 'B', 'G'),
279 WINED3DFMT_D16_LOCKABLE = 70,
280 WINED3DFMT_D32 = 71,
281 WINED3DFMT_D15S1 = 73,
282 WINED3DFMT_D24S8 = 75,
283 WINED3DFMT_D24X8 = 77,
284 WINED3DFMT_D24X4S4 = 79,
285 WINED3DFMT_D16 = 80,
286 WINED3DFMT_L16 = 81,
287 WINED3DFMT_D32F_LOCKABLE = 82,
288 WINED3DFMT_D24FS8 = 83,
290 WINED3DFMT_VERTEXDATA = 100,
291 WINED3DFMT_INDEX16 = 101,
292 WINED3DFMT_INDEX32 = 102,
293 WINED3DFMT_Q16W16V16U16 = 110,
294 /* Floating point formats */
295 WINED3DFMT_R16F = 111,
296 WINED3DFMT_G16R16F = 112,
297 WINED3DFMT_A16B16G16R16F = 113,
299 /* IEEE formats */
300 WINED3DFMT_R32F = 114,
301 WINED3DFMT_G32R32F = 115,
302 WINED3DFMT_A32B32G32R32F = 116,
304 WINED3DFMT_CxV8U8 = 117,
306 /* Vendor specific formats */
307 WINED3DFMT_ATI2N = WINEMAKEFOURCC('A', 'T', 'I', '2'),
309 WINED3DFMT_FORCE_DWORD = 0xFFFFFFFF
310 } WINED3DFORMAT;
312 typedef enum _WINED3DRENDERSTATETYPE {
313 WINED3DRS_TEXTUREHANDLE = 1, /* d3d7 */
314 WINED3DRS_ANTIALIAS = 2, /* d3d7 */
315 WINED3DRS_TEXTUREADDRESS = 3, /* d3d7 */
316 WINED3DRS_TEXTUREPERSPECTIVE = 4, /* d3d7 */
317 WINED3DRS_WRAPU = 5, /* d3d7 */
318 WINED3DRS_WRAPV = 6, /* d3d7 */
319 WINED3DRS_ZENABLE = 7,
320 WINED3DRS_FILLMODE = 8,
321 WINED3DRS_SHADEMODE = 9,
322 WINED3DRS_LINEPATTERN = 10, /* d3d7, d3d8 */
323 WINED3DRS_MONOENABLE = 11, /* d3d7 */
324 WINED3DRS_ROP2 = 12, /* d3d7 */
325 WINED3DRS_PLANEMASK = 13, /* d3d7 */
326 WINED3DRS_ZWRITEENABLE = 14,
327 WINED3DRS_ALPHATESTENABLE = 15,
328 WINED3DRS_LASTPIXEL = 16,
329 WINED3DRS_TEXTUREMAG = 17, /* d3d7 */
330 WINED3DRS_TEXTUREMIN = 18, /* d3d7 */
331 WINED3DRS_SRCBLEND = 19,
332 WINED3DRS_DESTBLEND = 20,
333 WINED3DRS_TEXTUREMAPBLEND = 21, /* d3d7 */
334 WINED3DRS_CULLMODE = 22,
335 WINED3DRS_ZFUNC = 23,
336 WINED3DRS_ALPHAREF = 24,
337 WINED3DRS_ALPHAFUNC = 25,
338 WINED3DRS_DITHERENABLE = 26,
339 WINED3DRS_ALPHABLENDENABLE = 27,
340 WINED3DRS_FOGENABLE = 28,
341 WINED3DRS_SPECULARENABLE = 29,
342 WINED3DRS_ZVISIBLE = 30, /* d3d7, d3d8 */
343 WINED3DRS_SUBPIXEL = 31, /* d3d7 */
344 WINED3DRS_SUBPIXELX = 32, /* d3d7 */
345 WINED3DRS_STIPPLEDALPHA = 33, /* d3d7 */
346 WINED3DRS_FOGCOLOR = 34,
347 WINED3DRS_FOGTABLEMODE = 35,
348 WINED3DRS_FOGSTART = 36,
349 WINED3DRS_FOGEND = 37,
350 WINED3DRS_FOGDENSITY = 38,
351 WINED3DRS_STIPPLEENABLE = 39, /* d3d7 */
352 WINED3DRS_EDGEANTIALIAS = 40, /* d3d7, d3d8 */
353 WINED3DRS_COLORKEYENABLE = 41, /* d3d7 */
354 WINED3DRS_BORDERCOLOR = 43, /* d3d7 */
355 WINED3DRS_TEXTUREADDRESSU = 44, /* d3d7 */
356 WINED3DRS_TEXTUREADDRESSV = 45, /* d3d7 */
357 WINED3DRS_MIPMAPLODBIAS = 46, /* d3d7 */
358 WINED3DRS_ZBIAS = 47, /* d3d7, d3d8 */
359 WINED3DRS_RANGEFOGENABLE = 48,
360 WINED3DRS_ANISOTROPY = 49, /* d3d7 */
361 WINED3DRS_FLUSHBATCH = 50, /* d3d7 */
362 WINED3DRS_TRANSLUCENTSORTINDEPENDENT = 51, /* d3d7 */
363 WINED3DRS_STENCILENABLE = 52,
364 WINED3DRS_STENCILFAIL = 53,
365 WINED3DRS_STENCILZFAIL = 54,
366 WINED3DRS_STENCILPASS = 55,
367 WINED3DRS_STENCILFUNC = 56,
368 WINED3DRS_STENCILREF = 57,
369 WINED3DRS_STENCILMASK = 58,
370 WINED3DRS_STENCILWRITEMASK = 59,
371 WINED3DRS_TEXTUREFACTOR = 60,
373 WINED3DRS_STIPPLEPATTERN00 = 64,
374 WINED3DRS_STIPPLEPATTERN01 = 65,
375 WINED3DRS_STIPPLEPATTERN02 = 66,
376 WINED3DRS_STIPPLEPATTERN03 = 67,
377 WINED3DRS_STIPPLEPATTERN04 = 68,
378 WINED3DRS_STIPPLEPATTERN05 = 69,
379 WINED3DRS_STIPPLEPATTERN06 = 70,
380 WINED3DRS_STIPPLEPATTERN07 = 71,
381 WINED3DRS_STIPPLEPATTERN08 = 72,
382 WINED3DRS_STIPPLEPATTERN09 = 73,
383 WINED3DRS_STIPPLEPATTERN10 = 74,
384 WINED3DRS_STIPPLEPATTERN11 = 75,
385 WINED3DRS_STIPPLEPATTERN12 = 76,
386 WINED3DRS_STIPPLEPATTERN13 = 77,
387 WINED3DRS_STIPPLEPATTERN14 = 78,
388 WINED3DRS_STIPPLEPATTERN15 = 79,
389 WINED3DRS_STIPPLEPATTERN16 = 80,
390 WINED3DRS_STIPPLEPATTERN17 = 81,
391 WINED3DRS_STIPPLEPATTERN18 = 82,
392 WINED3DRS_STIPPLEPATTERN19 = 83,
393 WINED3DRS_STIPPLEPATTERN20 = 84,
394 WINED3DRS_STIPPLEPATTERN21 = 85,
395 WINED3DRS_STIPPLEPATTERN22 = 86,
396 WINED3DRS_STIPPLEPATTERN23 = 87,
397 WINED3DRS_STIPPLEPATTERN24 = 88,
398 WINED3DRS_STIPPLEPATTERN25 = 89,
399 WINED3DRS_STIPPLEPATTERN26 = 90,
400 WINED3DRS_STIPPLEPATTERN27 = 91,
401 WINED3DRS_STIPPLEPATTERN28 = 92,
402 WINED3DRS_STIPPLEPATTERN29 = 93,
403 WINED3DRS_STIPPLEPATTERN30 = 94,
404 WINED3DRS_STIPPLEPATTERN31 = 95,
406 WINED3DRS_WRAP0 = 128,
407 WINED3DRS_WRAP1 = 129,
408 WINED3DRS_WRAP2 = 130,
409 WINED3DRS_WRAP3 = 131,
410 WINED3DRS_WRAP4 = 132,
411 WINED3DRS_WRAP5 = 133,
412 WINED3DRS_WRAP6 = 134,
413 WINED3DRS_WRAP7 = 135,
414 WINED3DRS_CLIPPING = 136,
415 WINED3DRS_LIGHTING = 137,
416 WINED3DRS_EXTENTS = 138, /* d3d7 */
417 WINED3DRS_AMBIENT = 139,
418 WINED3DRS_FOGVERTEXMODE = 140,
419 WINED3DRS_COLORVERTEX = 141,
420 WINED3DRS_LOCALVIEWER = 142,
421 WINED3DRS_NORMALIZENORMALS = 143,
422 WINED3DRS_COLORKEYBLENDENABLE = 144, /* d3d7 */
423 WINED3DRS_DIFFUSEMATERIALSOURCE = 145,
424 WINED3DRS_SPECULARMATERIALSOURCE = 146,
425 WINED3DRS_AMBIENTMATERIALSOURCE = 147,
426 WINED3DRS_EMISSIVEMATERIALSOURCE = 148,
427 WINED3DRS_VERTEXBLEND = 151,
428 WINED3DRS_CLIPPLANEENABLE = 152,
429 WINED3DRS_SOFTWAREVERTEXPROCESSING = 153, /* d3d8 */
430 WINED3DRS_POINTSIZE = 154,
431 WINED3DRS_POINTSIZE_MIN = 155,
432 WINED3DRS_POINTSPRITEENABLE = 156,
433 WINED3DRS_POINTSCALEENABLE = 157,
434 WINED3DRS_POINTSCALE_A = 158,
435 WINED3DRS_POINTSCALE_B = 159,
436 WINED3DRS_POINTSCALE_C = 160,
437 WINED3DRS_MULTISAMPLEANTIALIAS = 161,
438 WINED3DRS_MULTISAMPLEMASK = 162,
439 WINED3DRS_PATCHEDGESTYLE = 163,
440 WINED3DRS_PATCHSEGMENTS = 164, /* d3d8 */
441 WINED3DRS_DEBUGMONITORTOKEN = 165,
442 WINED3DRS_POINTSIZE_MAX = 166,
443 WINED3DRS_INDEXEDVERTEXBLENDENABLE = 167,
444 WINED3DRS_COLORWRITEENABLE = 168,
445 WINED3DRS_TWEENFACTOR = 170,
446 WINED3DRS_BLENDOP = 171,
447 WINED3DRS_POSITIONORDER = 172,
448 WINED3DRS_NORMALORDER = 173,
449 WINED3DRS_POSITIONDEGREE = 172,
450 WINED3DRS_NORMALDEGREE = 173,
451 WINED3DRS_SCISSORTESTENABLE = 174,
452 WINED3DRS_SLOPESCALEDEPTHBIAS = 175,
453 WINED3DRS_ANTIALIASEDLINEENABLE = 176,
454 WINED3DRS_MINTESSELLATIONLEVEL = 178,
455 WINED3DRS_MAXTESSELLATIONLEVEL = 179,
456 WINED3DRS_ADAPTIVETESS_X = 180,
457 WINED3DRS_ADAPTIVETESS_Y = 181,
458 WINED3DRS_ADAPTIVETESS_Z = 182,
459 WINED3DRS_ADAPTIVETESS_W = 183,
460 WINED3DRS_ENABLEADAPTIVETESSELLATION= 184,
461 WINED3DRS_TWOSIDEDSTENCILMODE = 185,
462 WINED3DRS_CCW_STENCILFAIL = 186,
463 WINED3DRS_CCW_STENCILZFAIL = 187,
464 WINED3DRS_CCW_STENCILPASS = 188,
465 WINED3DRS_CCW_STENCILFUNC = 189,
466 WINED3DRS_COLORWRITEENABLE1 = 190,
467 WINED3DRS_COLORWRITEENABLE2 = 191,
468 WINED3DRS_COLORWRITEENABLE3 = 192,
469 WINED3DRS_BLENDFACTOR = 193,
470 WINED3DRS_SRGBWRITEENABLE = 194,
471 WINED3DRS_DEPTHBIAS = 195,
472 WINED3DRS_WRAP8 = 198,
473 WINED3DRS_WRAP9 = 199,
474 WINED3DRS_WRAP10 = 200,
475 WINED3DRS_WRAP11 = 201,
476 WINED3DRS_WRAP12 = 202,
477 WINED3DRS_WRAP13 = 203,
478 WINED3DRS_WRAP14 = 204,
479 WINED3DRS_WRAP15 = 205,
480 WINED3DRS_SEPARATEALPHABLENDENABLE = 206,
481 WINED3DRS_SRCBLENDALPHA = 207,
482 WINED3DRS_DESTBLENDALPHA = 208,
483 WINED3DRS_BLENDOPALPHA = 209,
485 WINED3DRS_FORCE_DWORD = 0x7fffffff
486 } WINED3DRENDERSTATETYPE;
488 #define WINEHIGHEST_RENDER_STATE WINED3DRS_BLENDOPALPHA
489 /* Highest WINED3DRS_ value */
491 #define WINED3DCOLORWRITEENABLE_RED (1<<0)
492 #define WINED3DCOLORWRITEENABLE_GREEN (1<<1)
493 #define WINED3DCOLORWRITEENABLE_BLUE (1<<2)
494 #define WINED3DCOLORWRITEENABLE_ALPHA (1<<3)
496 typedef enum _WINED3DBLEND {
497 WINED3DBLEND_ZERO = 1,
498 WINED3DBLEND_ONE = 2,
499 WINED3DBLEND_SRCCOLOR = 3,
500 WINED3DBLEND_INVSRCCOLOR = 4,
501 WINED3DBLEND_SRCALPHA = 5,
502 WINED3DBLEND_INVSRCALPHA = 6,
503 WINED3DBLEND_DESTALPHA = 7,
504 WINED3DBLEND_INVDESTALPHA = 8,
505 WINED3DBLEND_DESTCOLOR = 9,
506 WINED3DBLEND_INVDESTCOLOR = 10,
507 WINED3DBLEND_SRCALPHASAT = 11,
508 WINED3DBLEND_BOTHSRCALPHA = 12,
509 WINED3DBLEND_BOTHINVSRCALPHA = 13,
510 WINED3DBLEND_BLENDFACTOR = 14,
511 WINED3DBLEND_INVBLENDFACTOR = 15,
512 WINED3DBLEND_FORCE_DWORD = 0x7fffffff
513 } WINED3DBLEND;
515 typedef enum _WINED3DBLENDOP {
516 WINED3DBLENDOP_ADD = 1,
517 WINED3DBLENDOP_SUBTRACT = 2,
518 WINED3DBLENDOP_REVSUBTRACT = 3,
519 WINED3DBLENDOP_MIN = 4,
520 WINED3DBLENDOP_MAX = 5,
522 WINED3DBLENDOP_FORCE_DWORD = 0x7fffffff
523 } WINED3DBLENDOP;
525 typedef enum _WINED3DVERTEXBLENDFLAGS {
526 WINED3DVBF_DISABLE = 0,
527 WINED3DVBF_1WEIGHTS = 1,
528 WINED3DVBF_2WEIGHTS = 2,
529 WINED3DVBF_3WEIGHTS = 3,
530 WINED3DVBF_TWEENING = 255,
531 WINED3DVBF_0WEIGHTS = 256
532 } WINED3DVERTEXBLENDFLAGS;
534 typedef enum _WINED3DCMPFUNC {
535 WINED3DCMP_NEVER = 1,
536 WINED3DCMP_LESS = 2,
537 WINED3DCMP_EQUAL = 3,
538 WINED3DCMP_LESSEQUAL = 4,
539 WINED3DCMP_GREATER = 5,
540 WINED3DCMP_NOTEQUAL = 6,
541 WINED3DCMP_GREATEREQUAL = 7,
542 WINED3DCMP_ALWAYS = 8,
544 WINED3DCMP_FORCE_DWORD = 0x7fffffff
545 } WINED3DCMPFUNC;
547 typedef enum _WINED3DZBUFFERTYPE {
548 WINED3DZB_FALSE = 0,
549 WINED3DZB_TRUE = 1,
550 WINED3DZB_USEW = 2,
552 WINED3DZB_FORCE_DWORD = 0x7fffffff
553 } WINED3DZBUFFERTYPE;
555 typedef enum _WINED3DFOGMODE {
556 WINED3DFOG_NONE = 0,
557 WINED3DFOG_EXP = 1,
558 WINED3DFOG_EXP2 = 2,
559 WINED3DFOG_LINEAR = 3,
561 WINED3DFOG_FORCE_DWORD = 0x7fffffff
562 } WINED3DFOGMODE;
564 typedef enum _WINED3DSHADEMODE {
565 WINED3DSHADE_FLAT = 1,
566 WINED3DSHADE_GOURAUD = 2,
567 WINED3DSHADE_PHONG = 3,
569 WINED3DSHADE_FORCE_DWORD = 0x7fffffff
570 } WINED3DSHADEMODE;
572 typedef enum _WINED3DFILLMODE {
573 WINED3DFILL_POINT = 1,
574 WINED3DFILL_WIREFRAME = 2,
575 WINED3DFILL_SOLID = 3,
577 WINED3DFILL_FORCE_DWORD = 0x7fffffff
578 } WINED3DFILLMODE;
580 typedef enum _WINED3DCULL {
581 WINED3DCULL_NONE = 1,
582 WINED3DCULL_CW = 2,
583 WINED3DCULL_CCW = 3,
585 WINED3DCULL_FORCE_DWORD = 0x7fffffff
586 } WINED3DCULL;
588 typedef enum _WINED3DSTENCILOP {
589 WINED3DSTENCILOP_KEEP = 1,
590 WINED3DSTENCILOP_ZERO = 2,
591 WINED3DSTENCILOP_REPLACE = 3,
592 WINED3DSTENCILOP_INCRSAT = 4,
593 WINED3DSTENCILOP_DECRSAT = 5,
594 WINED3DSTENCILOP_INVERT = 6,
595 WINED3DSTENCILOP_INCR = 7,
596 WINED3DSTENCILOP_DECR = 8,
598 WINED3DSTENCILOP_FORCE_DWORD = 0x7fffffff
599 } WINED3DSTENCILOP;
601 typedef enum _WINED3DMATERIALCOLORSOURCE {
602 WINED3DMCS_MATERIAL = 0,
603 WINED3DMCS_COLOR1 = 1,
604 WINED3DMCS_COLOR2 = 2,
606 WINED3DMCS_FORCE_DWORD = 0x7fffffff
607 } WINED3DMATERIALCOLORSOURCE;
609 typedef enum _WINED3DPATCHEDGESTYLE {
610 WINED3DPATCHEDGE_DISCRETE = 0,
611 WINED3DPATCHEDGE_CONTINUOUS = 1,
613 WINED3DPATCHEDGE_FORCE_DWORD = 0x7fffffff,
614 } WINED3DPATCHEDGESTYLE;
616 typedef struct _WINED3DDISPLAYMODE {
617 UINT Width;
618 UINT Height;
619 UINT RefreshRate;
620 WINED3DFORMAT Format;
621 } WINED3DDISPLAYMODE;
623 typedef enum _WINED3DBACKBUFFER_TYPE {
624 WINED3DBACKBUFFER_TYPE_MONO = 0,
625 WINED3DBACKBUFFER_TYPE_LEFT = 1,
626 WINED3DBACKBUFFER_TYPE_RIGHT = 2,
628 WINED3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff
629 } WINED3DBACKBUFFER_TYPE;
631 #define WINED3DADAPTER_DEFAULT 0
632 #define WINED3DENUM_NO_WHQL_LEVEL 2
633 #define WINED3DPRESENT_BACK_BUFFER_MAX 3
635 typedef enum _WINED3DSWAPEFFECT {
636 WINED3DSWAPEFFECT_DISCARD = 1,
637 WINED3DSWAPEFFECT_FLIP = 2,
638 WINED3DSWAPEFFECT_COPY = 3,
639 WINED3DSWAPEFFECT_COPY_VSYNC = 4,
640 WINED3DSWAPEFFECT_FORCE_DWORD = 0xFFFFFFFF
641 } WINED3DSWAPEFFECT;
643 typedef enum _WINED3DSAMPLERSTATETYPE {
644 WINED3DSAMP_ADDRESSU = 1,
645 WINED3DSAMP_ADDRESSV = 2,
646 WINED3DSAMP_ADDRESSW = 3,
647 WINED3DSAMP_BORDERCOLOR = 4,
648 WINED3DSAMP_MAGFILTER = 5,
649 WINED3DSAMP_MINFILTER = 6,
650 WINED3DSAMP_MIPFILTER = 7,
651 WINED3DSAMP_MIPMAPLODBIAS = 8,
652 WINED3DSAMP_MAXMIPLEVEL = 9,
653 WINED3DSAMP_MAXANISOTROPY = 10,
654 WINED3DSAMP_SRGBTEXTURE = 11,
655 WINED3DSAMP_ELEMENTINDEX = 12,
656 WINED3DSAMP_DMAPOFFSET = 13,
658 WINED3DSAMP_FORCE_DWORD = 0x7fffffff,
659 } WINED3DSAMPLERSTATETYPE;
660 #define WINED3D_HIGHEST_SAMPLER_STATE WINED3DSAMP_DMAPOFFSET
662 typedef enum _WINED3DMULTISAMPLE_TYPE {
663 WINED3DMULTISAMPLE_NONE = 0,
664 WINED3DMULTISAMPLE_NONMASKABLE = 1,
665 WINED3DMULTISAMPLE_2_SAMPLES = 2,
666 WINED3DMULTISAMPLE_3_SAMPLES = 3,
667 WINED3DMULTISAMPLE_4_SAMPLES = 4,
668 WINED3DMULTISAMPLE_5_SAMPLES = 5,
669 WINED3DMULTISAMPLE_6_SAMPLES = 6,
670 WINED3DMULTISAMPLE_7_SAMPLES = 7,
671 WINED3DMULTISAMPLE_8_SAMPLES = 8,
672 WINED3DMULTISAMPLE_9_SAMPLES = 9,
673 WINED3DMULTISAMPLE_10_SAMPLES = 10,
674 WINED3DMULTISAMPLE_11_SAMPLES = 11,
675 WINED3DMULTISAMPLE_12_SAMPLES = 12,
676 WINED3DMULTISAMPLE_13_SAMPLES = 13,
677 WINED3DMULTISAMPLE_14_SAMPLES = 14,
678 WINED3DMULTISAMPLE_15_SAMPLES = 15,
679 WINED3DMULTISAMPLE_16_SAMPLES = 16,
681 WINED3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
682 } WINED3DMULTISAMPLE_TYPE;
684 typedef enum _WINED3DTEXTURESTAGESTATETYPE {
685 WINED3DTSS_COLOROP = 1,
686 WINED3DTSS_COLORARG1 = 2,
687 WINED3DTSS_COLORARG2 = 3,
688 WINED3DTSS_ALPHAOP = 4,
689 WINED3DTSS_ALPHAARG1 = 5,
690 WINED3DTSS_ALPHAARG2 = 6,
691 WINED3DTSS_BUMPENVMAT00 = 7,
692 WINED3DTSS_BUMPENVMAT01 = 8,
693 WINED3DTSS_BUMPENVMAT10 = 9,
694 WINED3DTSS_BUMPENVMAT11 = 10,
695 WINED3DTSS_TEXCOORDINDEX = 11,
696 WINED3DTSS_ADDRESS = 12,
697 WINED3DTSS_ADDRESSU = 13,
698 WINED3DTSS_ADDRESSV = 14,
699 WINED3DTSS_BORDERCOLOR = 15,
700 WINED3DTSS_MAGFILTER = 16,
701 WINED3DTSS_MINFILTER = 17,
702 WINED3DTSS_MIPFILTER = 18,
703 WINED3DTSS_MIPMAPLODBIAS = 19,
704 WINED3DTSS_MAXMIPLEVEL = 20,
705 WINED3DTSS_MAXANISOTROPY = 21,
706 WINED3DTSS_BUMPENVLSCALE = 22,
707 WINED3DTSS_BUMPENVLOFFSET = 23,
708 WINED3DTSS_TEXTURETRANSFORMFLAGS = 24,
709 WINED3DTSS_ADDRESSW = 25,
710 WINED3DTSS_COLORARG0 = 26,
711 WINED3DTSS_ALPHAARG0 = 27,
712 WINED3DTSS_RESULTARG = 28,
713 WINED3DTSS_CONSTANT = 32,
715 WINED3DTSS_FORCE_DWORD = 0x7fffffff
716 } WINED3DTEXTURESTAGESTATETYPE;
718 #define WINED3DTSS_TCI_PASSTHRU 0x00000
719 #define WINED3DTSS_TCI_CAMERASPACENORMAL 0x10000
720 #define WINED3DTSS_TCI_CAMERASPACEPOSITION 0x20000
721 #define WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x30000
722 #define WINED3DTSS_TCI_SPHEREMAP 0x40000
724 #define WINED3D_HIGHEST_TEXTURE_STATE WINED3DTSS_CONSTANT
726 typedef enum _WINED3DTEXTURETRANSFORMFLAGS {
727 WINED3DTTFF_DISABLE = 0,
728 WINED3DTTFF_COUNT1 = 1,
729 WINED3DTTFF_COUNT2 = 2,
730 WINED3DTTFF_COUNT3 = 3,
731 WINED3DTTFF_COUNT4 = 4,
732 WINED3DTTFF_PROJECTED = 256,
734 WINED3DTTFF_FORCE_DWORD = 0x7fffffff
735 } WINED3DTEXTURETRANSFORMFLAGS;
737 typedef enum _WINED3DTEXTUREOP {
738 WINED3DTOP_DISABLE = 1,
739 WINED3DTOP_SELECTARG1 = 2,
740 WINED3DTOP_SELECTARG2 = 3,
741 WINED3DTOP_MODULATE = 4,
742 WINED3DTOP_MODULATE2X = 5,
743 WINED3DTOP_MODULATE4X = 6,
744 WINED3DTOP_ADD = 7,
745 WINED3DTOP_ADDSIGNED = 8,
746 WINED3DTOP_ADDSIGNED2X = 9,
747 WINED3DTOP_SUBTRACT = 10,
748 WINED3DTOP_ADDSMOOTH = 11,
749 WINED3DTOP_BLENDDIFFUSEALPHA = 12,
750 WINED3DTOP_BLENDTEXTUREALPHA = 13,
751 WINED3DTOP_BLENDFACTORALPHA = 14,
752 WINED3DTOP_BLENDTEXTUREALPHAPM = 15,
753 WINED3DTOP_BLENDCURRENTALPHA = 16,
754 WINED3DTOP_PREMODULATE = 17,
755 WINED3DTOP_MODULATEALPHA_ADDCOLOR = 18,
756 WINED3DTOP_MODULATECOLOR_ADDALPHA = 19,
757 WINED3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
758 WINED3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
759 WINED3DTOP_BUMPENVMAP = 22,
760 WINED3DTOP_BUMPENVMAPLUMINANCE = 23,
761 WINED3DTOP_DOTPRODUCT3 = 24,
762 WINED3DTOP_MULTIPLYADD = 25,
763 WINED3DTOP_LERP = 26,
765 WINED3DTOP_FORCE_DWORD = 0x7fffffff,
766 } WINED3DTEXTUREOP;
768 #define WINED3DTA_SELECTMASK 0x0000000f
769 #define WINED3DTA_DIFFUSE 0x00000000
770 #define WINED3DTA_CURRENT 0x00000001
771 #define WINED3DTA_TEXTURE 0x00000002
772 #define WINED3DTA_TFACTOR 0x00000003
773 #define WINED3DTA_SPECULAR 0x00000004
774 #define WINED3DTA_TEMP 0x00000005
775 #define WINED3DTA_CONSTANT 0x00000006
776 #define WINED3DTA_COMPLEMENT 0x00000010
777 #define WINED3DTA_ALPHAREPLICATE 0x00000020
779 typedef enum _WINED3DTEXTUREADDRESS {
780 WINED3DTADDRESS_WRAP = 1,
781 WINED3DTADDRESS_MIRROR = 2,
782 WINED3DTADDRESS_CLAMP = 3,
783 WINED3DTADDRESS_BORDER = 4,
784 WINED3DTADDRESS_MIRRORONCE = 5,
786 WINED3DTADDRESS_FORCE_DWORD = 0x7fffffff
787 } WINED3DTEXTUREADDRESS;
789 typedef enum _WINED3DTRANSFORMSTATETYPE {
790 WINED3DTS_VIEW = 2,
791 WINED3DTS_PROJECTION = 3,
792 WINED3DTS_TEXTURE0 = 16,
793 WINED3DTS_TEXTURE1 = 17,
794 WINED3DTS_TEXTURE2 = 18,
795 WINED3DTS_TEXTURE3 = 19,
796 WINED3DTS_TEXTURE4 = 20,
797 WINED3DTS_TEXTURE5 = 21,
798 WINED3DTS_TEXTURE6 = 22,
799 WINED3DTS_TEXTURE7 = 23,
801 WINED3DTS_FORCE_DWORD = 0x7fffffff
802 } WINED3DTRANSFORMSTATETYPE;
804 #define WINED3DTS_WORLD WINED3DTS_WORLDMATRIX(0)
805 #define WINED3DTS_WORLD1 WINED3DTS_WORLDMATRIX(1)
806 #define WINED3DTS_WORLD2 WINED3DTS_WORLDMATRIX(2)
807 #define WINED3DTS_WORLD3 WINED3DTS_WORLDMATRIX(3)
808 #define WINED3DTS_WORLDMATRIX(index) (WINED3DTRANSFORMSTATETYPE)(index + 256)
810 typedef enum _WINED3DBASISTYPE {
811 WINED3DBASIS_BEZIER = 0,
812 WINED3DBASIS_BSPLINE = 1,
813 WINED3DBASIS_INTERPOLATE = 2,
815 WINED3DBASIS_FORCE_DWORD = 0x7fffffff
816 } WINED3DBASISTYPE;
818 typedef enum _WINED3DCUBEMAP_FACES {
819 WINED3DCUBEMAP_FACE_POSITIVE_X = 0,
820 WINED3DCUBEMAP_FACE_NEGATIVE_X = 1,
821 WINED3DCUBEMAP_FACE_POSITIVE_Y = 2,
822 WINED3DCUBEMAP_FACE_NEGATIVE_Y = 3,
823 WINED3DCUBEMAP_FACE_POSITIVE_Z = 4,
824 WINED3DCUBEMAP_FACE_NEGATIVE_Z = 5,
826 WINED3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff
827 } WINED3DCUBEMAP_FACES;
829 typedef enum _WINED3DTEXTUREFILTERTYPE {
830 WINED3DTEXF_NONE = 0,
831 WINED3DTEXF_POINT = 1,
832 WINED3DTEXF_LINEAR = 2,
833 WINED3DTEXF_ANISOTROPIC = 3,
834 WINED3DTEXF_FLATCUBIC = 4,
835 WINED3DTEXF_GAUSSIANCUBIC = 5,
836 WINED3DTEXF_PYRAMIDALQUAD = 6,
837 WINED3DTEXF_GAUSSIANQUAD = 7,
838 WINED3DTEXF_FORCE_DWORD = 0x7fffffff
839 } WINED3DTEXTUREFILTERTYPE;
841 typedef struct _WINEDD3DRECTPATCH_INFO {
842 UINT StartVertexOffsetWidth;
843 UINT StartVertexOffsetHeight;
844 UINT Width;
845 UINT Height;
846 UINT Stride;
847 WINED3DBASISTYPE Basis;
848 WINED3DDEGREETYPE Degree;
849 } WINED3DRECTPATCH_INFO;
851 typedef struct _WINED3DTRIPATCH_INFO {
852 UINT StartVertexOffset;
853 UINT NumVertices;
854 WINED3DBASISTYPE Basis;
855 WINED3DDEGREETYPE Degree;
856 } WINED3DTRIPATCH_INFO;
859 typedef struct _WINED3DADAPTER_IDENTIFIER {
860 char *Driver;
861 char *Description;
862 char *DeviceName;
863 LARGE_INTEGER *DriverVersion;
864 DWORD *VendorId;
865 DWORD *DeviceId;
866 DWORD *SubSysId;
867 DWORD *Revision;
868 GUID *DeviceIdentifier;
869 DWORD *WHQLLevel;
870 } WINED3DADAPTER_IDENTIFIER;
872 typedef struct _WINED3DPRESENT_PARAMETERS {
873 UINT BackBufferWidth;
874 UINT BackBufferHeight;
875 WINED3DFORMAT BackBufferFormat;
876 UINT BackBufferCount;
877 WINED3DMULTISAMPLE_TYPE MultiSampleType;
878 DWORD MultiSampleQuality;
879 WINED3DSWAPEFFECT SwapEffect;
880 HWND hDeviceWindow;
881 BOOL Windowed;
882 BOOL EnableAutoDepthStencil;
883 WINED3DFORMAT AutoDepthStencilFormat;
884 DWORD Flags;
885 UINT FullScreen_RefreshRateInHz;
886 UINT PresentationInterval;
887 } WINED3DPRESENT_PARAMETERS;
889 typedef enum _WINED3DRESOURCETYPE {
890 WINED3DRTYPE_SURFACE = 1,
891 WINED3DRTYPE_VOLUME = 2,
892 WINED3DRTYPE_TEXTURE = 3,
893 WINED3DRTYPE_VOLUMETEXTURE = 4,
894 WINED3DRTYPE_CUBETEXTURE = 5,
895 WINED3DRTYPE_VERTEXBUFFER = 6,
896 WINED3DRTYPE_INDEXBUFFER = 7,
898 WINED3DRTYPE_FORCE_DWORD = 0x7fffffff
899 } WINED3DRESOURCETYPE;
901 #define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER+1)
903 typedef enum _WINED3DPOOL {
904 WINED3DPOOL_DEFAULT = 0,
905 WINED3DPOOL_MANAGED = 1,
906 WINED3DPOOL_SYSTEMMEM = 2,
907 WINED3DPOOL_SCRATCH = 3,
909 WINED3DPOOL_FORCE_DWORD = 0x7fffffff
910 } WINED3DPOOL;
912 typedef struct _WINED3DSURFACE_DESC
914 WINED3DFORMAT *Format;
915 WINED3DRESOURCETYPE *Type;
916 DWORD *Usage;
917 WINED3DPOOL *Pool;
918 UINT *Size;
920 WINED3DMULTISAMPLE_TYPE *MultiSampleType;
921 DWORD *MultiSampleQuality;
922 UINT *Width;
923 UINT *Height;
924 } WINED3DSURFACE_DESC;
926 typedef struct _WINED3DVOLUME_DESC
928 WINED3DFORMAT *Format;
929 WINED3DRESOURCETYPE *Type;
930 DWORD *Usage;
931 WINED3DPOOL *Pool;
932 UINT *Size;
934 UINT *Width;
935 UINT *Height;
936 UINT *Depth;
937 } WINED3DVOLUME_DESC;
939 typedef struct _WINED3DCLIPSTATUS {
940 DWORD ClipUnion;
941 DWORD ClipIntersection;
942 } WINED3DCLIPSTATUS;
945 typedef struct _WINED3DVERTEXELEMENT {
946 WORD Stream;
947 WORD Offset;
948 BYTE Type;
949 BYTE Method;
950 BYTE Usage;
951 BYTE UsageIndex;
952 int Reg; /* DirectX 8 */
953 } WINED3DVERTEXELEMENT, *LPWINED3DVERTEXELEMENT;
956 typedef enum _WINED3DQUERYTYPE {
957 WINED3DQUERYTYPE_VCACHE = 4,
958 WINED3DQUERYTYPE_RESOURCEMANAGER = 5,
959 WINED3DQUERYTYPE_VERTEXSTATS = 6,
960 WINED3DQUERYTYPE_EVENT = 8,
961 WINED3DQUERYTYPE_OCCLUSION = 9,
962 WINED3DQUERYTYPE_TIMESTAMP = 10,
963 WINED3DQUERYTYPE_TIMESTAMPDISJOINT = 11,
964 WINED3DQUERYTYPE_TIMESTAMPFREQ = 12,
965 WINED3DQUERYTYPE_PIPELINETIMINGS = 13,
966 WINED3DQUERYTYPE_INTERFACETIMINGS = 14,
967 WINED3DQUERYTYPE_VERTEXTIMINGS = 15,
968 WINED3DQUERYTYPE_PIXELTIMINGS = 16,
969 WINED3DQUERYTYPE_BANDWIDTHTIMINGS = 17,
970 WINED3DQUERYTYPE_CACHEUTILIZATION = 18
971 } WINED3DQUERYTYPE;
973 #define WINED3DISSUE_BEGIN (1 << 1)
974 #define WINED3DISSUE_END (1 << 0)
975 #define WINED3DGETDATA_FLUSH (1 << 0)
977 typedef struct _WINED3DDEVICE_CREATION_PARAMETERS {
978 UINT AdapterOrdinal;
979 WINED3DDEVTYPE DeviceType;
980 HWND hFocusWindow;
981 DWORD BehaviorFlags;
982 } WINED3DDEVICE_CREATION_PARAMETERS;
984 typedef struct _WINED3DDEVINFO_BANDWIDTHTIMINGS {
985 float MaxBandwidthUtilized;
986 float FrontEndUploadMemoryUtilizedPercent;
987 float VertexRateUtilizedPercent;
988 float TriangleSetupRateUtilizedPercent;
989 float FillRateUtilizedPercent;
990 } WINED3DDEVINFO_BANDWIDTHTIMINGS;
992 typedef struct _WINED3DDEVINFO_CACHEUTILIZATION {
993 float TextureCacheHitRate;
994 float PostTransformVertexCacheHitRate;
995 } WINED3DDEVINFO_CACHEUTILIZATION;
997 typedef struct _WINED3DDEVINFO_INTERFACETIMINGS {
998 float WaitingForGPUToUseApplicationResourceTimePercent;
999 float WaitingForGPUToAcceptMoreCommandsTimePercent;
1000 float WaitingForGPUToStayWithinLatencyTimePercent;
1001 float WaitingForGPUExclusiveResourceTimePercent;
1002 float WaitingForGPUOtherTimePercent;
1003 } WINED3DDEVINFO_INTERFACETIMINGS;
1005 typedef struct _WINED3DDEVINFO_PIPELINETIMINGS {
1006 float VertexProcessingTimePercent;
1007 float PixelProcessingTimePercent;
1008 float OtherGPUProcessingTimePercent;
1009 float GPUIdleTimePercent;
1010 } WINED3DDEVINFO_PIPELINETIMINGS;
1012 typedef struct _WINED3DDEVINFO_STAGETIMINGS {
1013 float MemoryProcessingPercent;
1014 float ComputationProcessingPercent;
1015 } WINED3DDEVINFO_STAGETIMINGS;
1017 typedef struct _WINED3DRASTER_STATUS {
1018 BOOL InVBlank;
1019 UINT ScanLine;
1020 } WINED3DRASTER_STATUS;
1023 typedef struct WINED3DRESOURCESTATS {
1024 BOOL bThrashing;
1025 DWORD ApproxBytesDownloaded;
1026 DWORD NumEvicts;
1027 DWORD NumVidCreates;
1028 DWORD LastPri;
1029 DWORD NumUsed;
1030 DWORD NumUsedInVidMem;
1031 DWORD WorkingSet;
1032 DWORD WorkingSetBytes;
1033 DWORD TotalManaged;
1034 DWORD TotalBytes;
1035 } WINED3DRESOURCESTATS;
1037 typedef struct _WINED3DDEVINFO_RESOURCEMANAGER {
1038 WINED3DRESOURCESTATS stats[WINED3DRTYPECOUNT];
1039 } WINED3DDEVINFO_RESOURCEMANAGER;
1041 typedef struct _WINED3DDEVINFO_VERTEXSTATS {
1042 DWORD NumRenderedTriangles;
1043 DWORD NumExtraClippingTriangles;
1044 } WINED3DDEVINFO_VERTEXSTATS;
1046 typedef struct _WINED3DLOCKED_RECT {
1047 INT Pitch;
1048 void* pBits;
1049 } WINED3DLOCKED_RECT;
1051 typedef struct _WINED3DLOCKED_BOX {
1052 INT RowPitch;
1053 INT SlicePitch;
1054 void* pBits;
1055 } WINED3DLOCKED_BOX;
1058 typedef struct _WINED3DBOX {
1059 UINT Left;
1060 UINT Top;
1061 UINT Right;
1062 UINT Bottom;
1063 UINT Front;
1064 UINT Back;
1065 } WINED3DBOX;
1067 /*Vertex cache optimization hints.*/
1068 typedef struct WINED3DDEVINFO_VCACHE {
1069 /*Must be a 4 char code FOURCC (e.g. CACH)*/
1070 DWORD Pattern;
1071 /*0 to get the longest strips, 1 vertex cache*/
1072 DWORD OptMethod;
1073 /*Cache size to use (only valid if OptMethod==1) */
1074 DWORD CacheSize;
1075 /*internal for deciding when to restart strips, non user modifyable (only valid if OptMethod==1)*/
1076 DWORD MagicNumber;
1077 } WINED3DDEVINFO_VCACHE;
1079 typedef struct _WINED3DVERTEXBUFFER_DESC {
1080 WINED3DFORMAT Format;
1081 WINED3DRESOURCETYPE Type;
1082 DWORD Usage;
1083 WINED3DPOOL Pool;
1084 UINT Size;
1085 DWORD FVF;
1086 } WINED3DVERTEXBUFFER_DESC;
1088 typedef struct _WINED3DINDEXBUFFER_DESC {
1089 WINED3DFORMAT Format;
1090 WINED3DRESOURCETYPE Type;
1091 DWORD Usage;
1092 WINED3DPOOL Pool;
1093 UINT Size;
1094 } WINED3DINDEXBUFFER_DESC;
1097 * The wined3dcaps structure
1100 typedef struct _WINED3DVSHADERCAPS2_0 {
1101 DWORD Caps;
1102 INT DynamicFlowControlDepth;
1103 INT NumTemps;
1104 INT StaticFlowControlDepth;
1105 } WINED3DVSHADERCAPS2_0;
1107 typedef struct _WINED3DPSHADERCAPS2_0 {
1108 DWORD Caps;
1109 INT DynamicFlowControlDepth;
1110 INT NumTemps;
1111 INT StaticFlowControlDepth;
1112 INT NumInstructionSlots;
1113 } WINED3DPSHADERCAPS2_0;
1115 typedef struct _WINEDDCAPS {
1116 DWORD Caps;
1117 DWORD Caps2;
1118 DWORD CKeyCaps;
1119 DWORD FXCaps;
1120 DWORD FXAlphaCaps;
1121 DWORD PalCaps;
1122 DWORD SVCaps;
1123 DWORD SVBCaps;
1124 DWORD SVBCKeyCaps;
1125 DWORD SVBFXCaps;
1126 DWORD VSBCaps;
1127 DWORD VSBCKeyCaps;
1128 DWORD VSBFXCaps;
1129 DWORD SSBCaps;
1130 DWORD SSBCKeyCaps;
1131 DWORD SSBFXCaps;
1132 DWORD ddsCaps;
1133 DWORD StrideAlign;
1134 } WINEDDCAPS;
1136 typedef struct _WINED3DCAPS {
1137 WINED3DDEVTYPE DeviceType;
1138 UINT AdapterOrdinal;
1140 DWORD Caps;
1141 DWORD Caps2;
1142 DWORD Caps3;
1143 DWORD PresentationIntervals;
1145 DWORD CursorCaps;
1147 DWORD DevCaps;
1149 DWORD PrimitiveMiscCaps;
1150 DWORD RasterCaps;
1151 DWORD ZCmpCaps;
1152 DWORD SrcBlendCaps;
1153 DWORD DestBlendCaps;
1154 DWORD AlphaCmpCaps;
1155 DWORD ShadeCaps;
1156 DWORD TextureCaps;
1157 DWORD TextureFilterCaps;
1158 DWORD CubeTextureFilterCaps;
1159 DWORD VolumeTextureFilterCaps;
1160 DWORD TextureAddressCaps;
1161 DWORD VolumeTextureAddressCaps;
1163 DWORD LineCaps;
1165 DWORD MaxTextureWidth;
1166 DWORD MaxTextureHeight;
1167 DWORD MaxVolumeExtent;
1169 DWORD MaxTextureRepeat;
1170 DWORD MaxTextureAspectRatio;
1171 DWORD MaxAnisotropy;
1172 float MaxVertexW;
1174 float GuardBandLeft;
1175 float GuardBandTop;
1176 float GuardBandRight;
1177 float GuardBandBottom;
1179 float ExtentsAdjust;
1180 DWORD StencilCaps;
1182 DWORD FVFCaps;
1183 DWORD TextureOpCaps;
1184 DWORD MaxTextureBlendStages;
1185 DWORD MaxSimultaneousTextures;
1187 DWORD VertexProcessingCaps;
1188 DWORD MaxActiveLights;
1189 DWORD MaxUserClipPlanes;
1190 DWORD MaxVertexBlendMatrices;
1191 DWORD MaxVertexBlendMatrixIndex;
1193 float MaxPointSize;
1195 DWORD MaxPrimitiveCount;
1196 DWORD MaxVertexIndex;
1197 DWORD MaxStreams;
1198 DWORD MaxStreamStride;
1200 DWORD VertexShaderVersion;
1201 DWORD MaxVertexShaderConst;
1203 DWORD PixelShaderVersion;
1204 float PixelShader1xMaxValue;
1206 /* DX 9 */
1207 DWORD DevCaps2;
1209 float MaxNpatchTessellationLevel;
1210 DWORD Reserved5; /*undocumented*/
1212 UINT MasterAdapterOrdinal;
1213 UINT AdapterOrdinalInGroup;
1214 UINT NumberOfAdaptersInGroup;
1215 DWORD DeclTypes;
1216 DWORD NumSimultaneousRTs;
1217 DWORD StretchRectFilterCaps;
1218 WINED3DVSHADERCAPS2_0 VS20Caps;
1219 WINED3DPSHADERCAPS2_0 PS20Caps;
1220 DWORD VertexTextureFilterCaps;
1221 DWORD MaxVShaderInstructionsExecuted;
1222 DWORD MaxPShaderInstructionsExecuted;
1223 DWORD MaxVertexShader30InstructionSlots;
1224 DWORD MaxPixelShader30InstructionSlots;
1225 DWORD Reserved2;/* Not in the microsoft headers but documented */
1226 DWORD Reserved3;
1228 WINEDDCAPS DirectDrawCaps;
1229 } WINED3DCAPS;
1231 typedef enum _WINED3DSTATEBLOCKTYPE {
1232 WINED3DSBT_INIT = 0,
1233 WINED3DSBT_ALL = 1,
1234 WINED3DSBT_PIXELSTATE = 2,
1235 WINED3DSBT_VERTEXSTATE = 3,
1236 WINED3DSBT_RECORDED = 4, /* WineD3D private */
1238 WINED3DSBT_FORCE_DWORD = 0xffffffff
1239 } WINED3DSTATEBLOCKTYPE;
1241 typedef struct glDescriptor {
1242 UINT textureName;
1243 int level;
1244 int target;
1245 int/*GLenum*/ glFormat;
1246 int/*GLenum*/ glFormatInternal;
1247 int/*GLenum*/ glType;
1248 } glDescriptor;
1250 #define WINED3DDP_MAXTEXCOORD 8
1252 typedef enum _WINED3DDECLMETHOD {
1253 WINED3DDECLMETHOD_DEFAULT = 0,
1254 WINED3DDECLMETHOD_PARTIALU = 1,
1255 WINED3DDECLMETHOD_PARTIALV = 2,
1256 WINED3DDECLMETHOD_CROSSUV = 3,
1257 WINED3DDECLMETHOD_UV = 4,
1258 WINED3DDECLMETHOD_LOOKUP = 5,
1259 WINED3DDECLMETHOD_LOOKUPPRESAMPLED = 6
1260 } WINED3DDECLMETHOD;
1262 typedef enum _WINED3DDECLTYPE {
1263 WINED3DDECLTYPE_FLOAT1 = 0,
1264 WINED3DDECLTYPE_FLOAT2 = 1,
1265 WINED3DDECLTYPE_FLOAT3 = 2,
1266 WINED3DDECLTYPE_FLOAT4 = 3,
1267 WINED3DDECLTYPE_D3DCOLOR = 4,
1268 WINED3DDECLTYPE_UBYTE4 = 5,
1269 WINED3DDECLTYPE_SHORT2 = 6,
1270 WINED3DDECLTYPE_SHORT4 = 7,
1271 /* VS 2.0 */
1272 WINED3DDECLTYPE_UBYTE4N = 8,
1273 WINED3DDECLTYPE_SHORT2N = 9,
1274 WINED3DDECLTYPE_SHORT4N = 10,
1275 WINED3DDECLTYPE_USHORT2N = 11,
1276 WINED3DDECLTYPE_USHORT4N = 12,
1277 WINED3DDECLTYPE_UDEC3 = 13,
1278 WINED3DDECLTYPE_DEC3N = 14,
1279 WINED3DDECLTYPE_FLOAT16_2 = 15,
1280 WINED3DDECLTYPE_FLOAT16_4 = 16,
1281 WINED3DDECLTYPE_UNUSED = 17,
1282 } WINED3DDECLTYPE;
1284 #define WINED3DDECL_END() {0xFF,0,WINED3DDECLTYPE_UNUSED,0,0,0,-1}
1286 typedef struct WineDirect3DStridedData {
1287 BYTE *lpData; /* Pointer to start of data */
1288 DWORD dwStride; /* Stride between occurrences of this data */
1289 DWORD dwType; /* Type (as in D3DVSDT_TYPE) */
1290 int VBO; /* Vertex buffer object this data is in */
1291 UINT streamNo; /* D3D stream number */
1292 } WineDirect3DStridedData;
1294 typedef struct WineDirect3DVertexStridedData {
1295 /* IMPORTANT:
1297 * This structure can be accessed in two ways: Named access, and array
1298 * access. Please note that named access is only valid with the fixed
1299 * function vertex pipeline, and the arrays are only valid with the
1300 * programmable vertex pipeline(vertex shaders)
1302 union {
1303 struct {
1305 /* Do not add or reorder fields here,
1306 * so this can be indexed as an array */
1307 WineDirect3DStridedData position;
1308 WineDirect3DStridedData blendWeights;
1309 WineDirect3DStridedData blendMatrixIndices;
1310 WineDirect3DStridedData normal;
1311 WineDirect3DStridedData pSize;
1312 WineDirect3DStridedData diffuse;
1313 WineDirect3DStridedData specular;
1314 WineDirect3DStridedData texCoords[WINED3DDP_MAXTEXCOORD];
1315 WineDirect3DStridedData position2; /* tween data */
1316 WineDirect3DStridedData normal2; /* tween data */
1317 WineDirect3DStridedData tangent;
1318 WineDirect3DStridedData binormal;
1319 WineDirect3DStridedData tessFactor;
1320 WineDirect3DStridedData fog;
1321 WineDirect3DStridedData depth;
1322 WineDirect3DStridedData sample;
1324 /* Add fields here */
1325 BOOL position_transformed;
1327 } s;
1328 WineDirect3DStridedData input[16]; /* Indexed by constants in D3DVSDE_REGISTER */
1329 } u;
1330 } WineDirect3DVertexStridedData;
1332 typedef enum {
1333 WINED3DDECLUSAGE_POSITION = 0,
1334 WINED3DDECLUSAGE_BLENDWEIGHT = 1,
1335 WINED3DDECLUSAGE_BLENDINDICES = 2,
1336 WINED3DDECLUSAGE_NORMAL = 3,
1337 WINED3DDECLUSAGE_PSIZE = 4,
1338 WINED3DDECLUSAGE_TEXCOORD = 5,
1339 WINED3DDECLUSAGE_TANGENT = 6,
1340 WINED3DDECLUSAGE_BINORMAL = 7,
1341 WINED3DDECLUSAGE_TESSFACTOR = 8,
1342 WINED3DDECLUSAGE_POSITIONT = 9,
1343 WINED3DDECLUSAGE_COLOR = 10,
1344 WINED3DDECLUSAGE_FOG = 11,
1345 WINED3DDECLUSAGE_DEPTH = 12,
1346 WINED3DDECLUSAGE_SAMPLE = 13
1347 } WINED3DDECLUSAGE;
1349 #define WINED3DUSAGE_RENDERTARGET 0x00000001L
1350 #define WINED3DUSAGE_DEPTHSTENCIL 0x00000002L
1351 #define WINED3DUSAGE_WRITEONLY 0x00000008L
1352 #define WINED3DUSAGE_SOFTWAREPROCESSING 0x00000010L
1353 #define WINED3DUSAGE_DONOTCLIP 0x00000020L
1354 #define WINED3DUSAGE_POINTS 0x00000040L
1355 #define WINED3DUSAGE_RTPATCHES 0x00000080L
1356 #define WINED3DUSAGE_NPATCHES 0x00000100L
1357 #define WINED3DUSAGE_DYNAMIC 0x00000200L
1358 #define WINED3DUSAGE_AUTOGENMIPMAP 0x00000400L
1359 #define WINED3DUSAGE_DMAP 0x00004000L
1360 #define WINED3DUSAGE_MASK 0x00004FFFL
1361 #define WINED3DUSAGE_OVERLAY 0x80000000L
1363 #define WINED3DUSAGE_QUERY_LEGACYBUMPMAP 0x00008000L
1364 #define WINED3DUSAGE_QUERY_FILTER 0x00020000L
1365 #define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING 0x00080000L
1366 #define WINED3DUSAGE_QUERY_SRGBREAD 0x00010000L
1367 #define WINED3DUSAGE_QUERY_SRGBWRITE 0x00040000L
1368 #define WINED3DUSAGE_QUERY_VERTEXTEXTURE 0x00100000L
1369 #define WINED3DUSAGE_QUERY_WRAPANDMIP 0x00200000L
1370 #define WINED3DUSAGE_QUERY_MASK 0x003F8000L
1372 typedef enum _WINED3DSURFTYPE {
1373 SURFACE_UNKNOWN = 0, /* Default / Unknown surface type */
1374 SURFACE_OPENGL, /* OpenGL surface: Renders using libGL, needed for 3D */
1375 SURFACE_GDI, /* User surface. No 3D, DirectDraw rendering with GDI */
1376 } WINED3DSURFTYPE;
1378 #define WINED3DCAPS2_NO2DDURING3DSCENE 0x00000002L
1379 #define WINED3DCAPS2_FULLSCREENGAMMA 0x00020000L
1380 #define WINED3DCAPS2_CANRENDERWINDOWED 0x00080000L
1381 #define WINED3DCAPS2_CANCALIBRATEGAMMA 0x00100000L
1382 #define WINED3DCAPS2_RESERVED 0x02000000L
1383 #define WINED3DCAPS2_CANMANAGERESOURCE 0x10000000L
1384 #define WINED3DCAPS2_DYNAMICTEXTURES 0x20000000L
1385 #define WINED3DCAPS2_CANAUTOGENMIPMAP 0x40000000L
1387 #define WINED3DPRASTERCAPS_DITHER 0x00000001L
1388 #define WINED3DPRASTERCAPS_ROP2 0x00000002L
1389 #define WINED3DPRASTERCAPS_XOR 0x00000004L
1390 #define WINED3DPRASTERCAPS_PAT 0x00000008L
1391 #define WINED3DPRASTERCAPS_ZTEST 0x00000010L
1392 #define WINED3DPRASTERCAPS_SUBPIXEL 0x00000020L
1393 #define WINED3DPRASTERCAPS_SUBPIXELX 0x00000040L
1394 #define WINED3DPRASTERCAPS_FOGVERTEX 0x00000080L
1395 #define WINED3DPRASTERCAPS_FOGTABLE 0x00000100L
1396 #define WINED3DPRASTERCAPS_STIPPLE 0x00000200L
1397 #define WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
1398 #define WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
1399 #define WINED3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
1400 #define WINED3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
1401 #define WINED3DPRASTERCAPS_ZBIAS 0x00004000L
1402 #define WINED3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
1403 #define WINED3DPRASTERCAPS_FOGRANGE 0x00010000L
1404 #define WINED3DPRASTERCAPS_ANISOTROPY 0x00020000L
1405 #define WINED3DPRASTERCAPS_WBUFFER 0x00040000L
1406 #define WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L
1407 #define WINED3DPRASTERCAPS_WFOG 0x00100000L
1408 #define WINED3DPRASTERCAPS_ZFOG 0x00200000L
1409 #define WINED3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L
1410 #define WINED3DPRASTERCAPS_SCISSORTEST 0x01000000L
1411 #define WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS 0x02000000L
1412 #define WINED3DPRASTERCAPS_DEPTHBIAS 0x04000000L
1413 #define WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE 0x08000000L
1415 #define WINED3DPSHADECAPS_COLORFLATMONO 0x000001
1416 #define WINED3DPSHADECAPS_COLORFLATRGB 0x000002
1417 #define WINED3DPSHADECAPS_COLORGOURAUDMONO 0x000004
1418 #define WINED3DPSHADECAPS_COLORGOURAUDRGB 0x000008
1419 #define WINED3DPSHADECAPS_COLORPHONGMONO 0x000010
1420 #define WINED3DPSHADECAPS_COLORPHONGRGB 0x000020
1421 #define WINED3DPSHADECAPS_SPECULARFLATMONO 0x000040
1422 #define WINED3DPSHADECAPS_SPECULARFLATRGB 0x000080
1423 #define WINED3DPSHADECAPS_SPECULARGOURAUDMONO 0x000100
1424 #define WINED3DPSHADECAPS_SPECULARGOURAUDRGB 0x000200
1425 #define WINED3DPSHADECAPS_SPECULARPHONGMONO 0x000400
1426 #define WINED3DPSHADECAPS_SPECULARPHONGRGB 0x000800
1427 #define WINED3DPSHADECAPS_ALPHAFLATBLEND 0x001000
1428 #define WINED3DPSHADECAPS_ALPHAFLATSTIPPLED 0x002000
1429 #define WINED3DPSHADECAPS_ALPHAGOURAUDBLEND 0x004000
1430 #define WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x008000
1431 #define WINED3DPSHADECAPS_ALPHAPHONGBLEND 0x010000
1432 #define WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x020000
1433 #define WINED3DPSHADECAPS_FOGFLAT 0x040000
1434 #define WINED3DPSHADECAPS_FOGGOURAUD 0x080000
1435 #define WINED3DPSHADECAPS_FOGPHONG 0x100000
1437 #define WINED3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
1438 #define WINED3DPTEXTURECAPS_POW2 0x00000002L
1439 #define WINED3DPTEXTURECAPS_ALPHA 0x00000004L
1440 #define WINED3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
1441 #define WINED3DPTEXTURECAPS_BORDER 0x00000010L
1442 #define WINED3DPTEXTURECAPS_SQUAREONLY 0x00000020L
1443 #define WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
1444 #define WINED3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L
1445 #define WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
1446 #define WINED3DPTEXTURECAPS_PROJECTED 0x00000400L
1447 #define WINED3DPTEXTURECAPS_CUBEMAP 0x00000800L
1448 #define WINED3DPTEXTURECAPS_COLORKEYBLEND 0x00001000L
1449 #define WINED3DPTEXTURECAPS_VOLUMEMAP 0x00002000L
1450 #define WINED3DPTEXTURECAPS_MIPMAP 0x00004000L
1451 #define WINED3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L
1452 #define WINED3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L
1453 #define WINED3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L
1454 #define WINED3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L
1455 #define WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV 0x00200000L
1457 #define WINED3DPTFILTERCAPS_NEAREST 0x00000001
1458 #define WINED3DPTFILTERCAPS_LINEAR 0x00000002
1459 #define WINED3DPTFILTERCAPS_MIPNEAREST 0x00000004
1460 #define WINED3DPTFILTERCAPS_MIPLINEAR 0x00000008
1461 #define WINED3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010
1462 #define WINED3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020
1463 #define WINED3DPTFILTERCAPS_MINFPOINT 0x00000100
1464 #define WINED3DPTFILTERCAPS_MINFLINEAR 0x00000200
1465 #define WINED3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400
1466 #define WINED3DPTFILTERCAPS_MIPFPOINT 0x00010000
1467 #define WINED3DPTFILTERCAPS_MIPFLINEAR 0x00020000
1468 #define WINED3DPTFILTERCAPS_MAGFPOINT 0x01000000
1469 #define WINED3DPTFILTERCAPS_MAGFLINEAR 0x02000000
1470 #define WINED3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000
1471 #define WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD 0x08000000
1472 #define WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD 0x10000000
1474 #define WINED3DVTXPCAPS_TEXGEN 0x00000001L
1475 #define WINED3DVTXPCAPS_MATERIALSOURCE7 0x00000002L
1476 #define WINED3DVTXPCAPS_VERTEXFOG 0x00000004L
1477 #define WINED3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L
1478 #define WINED3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L
1479 #define WINED3DVTXPCAPS_LOCALVIEWER 0x00000020L
1480 #define WINED3DVTXPCAPS_TWEENING 0x00000040L
1481 #define WINED3DVTXPCAPS_TEXGEN_SPHEREMAP 0x00000100L
1482 #define WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER 0x00000200L
1484 #define WINED3DCURSORCAPS_COLOR 0x000000001
1485 #define WINED3DCURSORCAPS_LOWRES 0x000000002
1487 #define WINED3DDEVCAPS_FLOATTLVERTEX 0x000000001
1488 #define WINED3DDEVCAPS_SORTINCREASINGZ 0x000000002
1489 #define WINED3DDEVCAPS_SORTDECREASINGZ 0X000000004
1490 #define WINED3DDEVCAPS_SORTEXACT 0x000000008
1491 #define WINED3DDEVCAPS_EXECUTESYSTEMMEMORY 0x000000010
1492 #define WINED3DDEVCAPS_EXECUTEVIDEOMEMORY 0x000000020
1493 #define WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x000000040
1494 #define WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x000000080
1495 #define WINED3DDEVCAPS_TEXTURESYSTEMMEMORY 0x000000100
1496 #define WINED3DDEVCAPS_TEXTUREVIDEOMEMORY 0x000000200
1497 #define WINED3DDEVCAPS_DRAWPRIMTLVERTEX 0x000000400
1498 #define WINED3DDEVCAPS_CANRENDERAFTERFLIP 0x000000800
1499 #define WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x000001000
1500 #define WINED3DDEVCAPS_DRAWPRIMITIVES2 0x000002000
1501 #define WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x000004000
1502 #define WINED3DDEVCAPS_DRAWPRIMITIVES2EX 0x000008000
1503 #define WINED3DDEVCAPS_HWTRANSFORMANDLIGHT 0x000010000
1504 #define WINED3DDEVCAPS_CANBLTSYSTONONLOCAL 0x000020000
1505 #define WINED3DDEVCAPS_HWRASTERIZATION 0x000080000
1506 #define WINED3DDEVCAPS_PUREDEVICE 0x000100000
1507 #define WINED3DDEVCAPS_QUINTICRTPATCHES 0x000200000
1508 #define WINED3DDEVCAPS_RTPATCHES 0x000400000
1509 #define WINED3DDEVCAPS_RTPATCHHANDLEZERO 0x000800000
1510 #define WINED3DDEVCAPS_NPATCHES 0x001000000
1512 #define WINED3DLOCK_READONLY 0x0010
1513 #define WINED3DLOCK_NOSYSLOCK 0x0800
1514 #define WINED3DLOCK_NOOVERWRITE 0x1000
1515 #define WINED3DLOCK_DISCARD 0x2000
1516 #define WINED3DLOCK_DONOTWAIT 0x4000
1517 #define WINED3DLOCK_NO_DIRTY_UPDATE 0x8000
1519 #define WINED3DPRESENT_RATE_DEFAULT 0x000000000
1521 #define WINED3DPRESENT_INTERVAL_DEFAULT 0x00000000
1522 #define WINED3DPRESENT_INTERVAL_ONE 0x00000001
1523 #define WINED3DPRESENT_INTERVAL_TWO 0x00000002
1524 #define WINED3DPRESENT_INTERVAL_THREE 0x00000004
1525 #define WINED3DPRESENT_INTERVAL_FOUR 0x00000008
1526 #define WINED3DPRESENT_INTERVAL_IMMEDIATE 0x80000000
1528 #define WINED3DMAXUSERCLIPPLANES 32
1529 #define WINED3DCLIPPLANE0 (1 << 0)
1530 #define WINED3DCLIPPLANE1 (1 << 1)
1531 #define WINED3DCLIPPLANE2 (1 << 2)
1532 #define WINED3DCLIPPLANE3 (1 << 3)
1533 #define WINED3DCLIPPLANE4 (1 << 4)
1534 #define WINED3DCLIPPLANE5 (1 << 5)
1536 /* FVF (Flexible Vertex Format) codes */
1537 #define WINED3DFVF_RESERVED0 0x0001
1538 #define WINED3DFVF_POSITION_MASK 0x000E
1539 #define WINED3DFVF_XYZ 0x0002
1540 #define WINED3DFVF_XYZRHW 0x0004
1541 #define WINED3DFVF_XYZB1 0x0006
1542 #define WINED3DFVF_XYZB2 0x0008
1543 #define WINED3DFVF_XYZB3 0x000a
1544 #define WINED3DFVF_XYZB4 0x000c
1545 #define WINED3DFVF_XYZB5 0x000e
1546 #define WINED3DFVF_XYZW 0x4002
1547 #define WINED3DFVF_NORMAL 0x0010
1548 #define WINED3DFVF_PSIZE 0x0020
1549 #define WINED3DFVF_DIFFUSE 0x0040
1550 #define WINED3DFVF_SPECULAR 0x0080
1551 #define WINED3DFVF_TEXCOUNT_MASK 0x0f00
1552 #define WINED3DFVF_TEXCOUNT_SHIFT 8
1553 #define WINED3DFVF_TEX0 0x0000
1554 #define WINED3DFVF_TEX1 0x0100
1555 #define WINED3DFVF_TEX2 0x0200
1556 #define WINED3DFVF_TEX3 0x0300
1557 #define WINED3DFVF_TEX4 0x0400
1558 #define WINED3DFVF_TEX5 0x0500
1559 #define WINED3DFVF_TEX6 0x0600
1560 #define WINED3DFVF_TEX7 0x0700
1561 #define WINED3DFVF_TEX8 0x0800
1562 #define WINED3DFVF_LASTBETA_UBYTE4 0x1000
1563 #define WINED3DFVF_LASTBETA_D3DCOLOR 0x8000
1564 #define WINED3DFVF_RESERVED2 0x6000
1566 #define WINED3DFVF_TEXTUREFORMAT1 3
1567 #define WINED3DFVF_TEXTUREFORMAT2 0
1568 #define WINED3DFVF_TEXTUREFORMAT3 1
1569 #define WINED3DFVF_TEXTUREFORMAT4 2
1570 #define WINED3DFVF_TEXCOORDSIZE1(CoordIndex) (WINED3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
1571 #define WINED3DFVF_TEXCOORDSIZE2(CoordIndex) (WINED3DFVF_TEXTUREFORMAT2)
1572 #define WINED3DFVF_TEXCOORDSIZE3(CoordIndex) (WINED3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
1573 #define WINED3DFVF_TEXCOORDSIZE4(CoordIndex) (WINED3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
1575 /* Clear flags */
1576 #define WINED3DCLEAR_TARGET 0x00000001
1577 #define WINED3DCLEAR_ZBUFFER 0x00000002
1578 #define WINED3DCLEAR_STENCIL 0x00000004
1580 /* Stream source flags */
1581 #define WINED3DSTREAMSOURCE_INDEXEDDATA (1 << 30)
1582 #define WINED3DSTREAMSOURCE_INSTANCEDATA (2 << 30)
1584 /* SetPrivateData flags */
1585 #define WINED3DSPD_IUNKNOWN 0x00000001
1587 /* IWineD3D::CreateDevice behaviour flags */
1588 #define WINED3DCREATE_FPU_PRESERVE 0x00000002
1589 #define WINED3DCREATE_PUREDEVICE 0x00000010
1590 #define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020
1591 #define WINED3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040
1592 #define WINED3DCREATE_MIXED_VERTEXPROCESSING 0x00000080
1593 #define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT 0x00000100
1594 #define WINED3DCREATE_ADAPTERGROUP_DEVICE 0x00000200
1596 /* VTF defines */
1597 #define WINED3DDMAPSAMPLER 0x100
1598 #define WINED3DVERTEXTEXTURESAMPLER0 (WINED3DDMAPSAMPLER + 1)
1599 #define WINED3DVERTEXTEXTURESAMPLER1 (WINED3DDMAPSAMPLER + 2)
1600 #define WINED3DVERTEXTEXTURESAMPLER2 (WINED3DDMAPSAMPLER + 3)
1601 #define WINED3DVERTEXTEXTURESAMPLER3 (WINED3DDMAPSAMPLER + 4)
1603 /* DirectDraw types */
1605 typedef struct _WINEDDCOLORKEY
1607 DWORD dwColorSpaceLowValue; /* low boundary of color space that is to
1608 * be treated as Color Key, inclusive
1610 DWORD dwColorSpaceHighValue; /* high boundary of color space that is
1611 * to be treated as Color Key, inclusive
1613 } WINEDDCOLORKEY,*LPWINEDDCOLORKEY;
1615 typedef struct _WINEDDBLTFX
1617 DWORD dwSize; /* size of structure */
1618 DWORD dwDDFX; /* FX operations */
1619 DWORD dwROP; /* Win32 raster operations */
1620 DWORD dwDDROP; /* Raster operations new for DirectDraw */
1621 DWORD dwRotationAngle; /* Rotation angle for blt */
1622 DWORD dwZBufferOpCode; /* ZBuffer compares */
1623 DWORD dwZBufferLow; /* Low limit of Z buffer */
1624 DWORD dwZBufferHigh; /* High limit of Z buffer */
1625 DWORD dwZBufferBaseDest; /* Destination base value */
1626 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
1627 union
1629 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
1630 struct IWineD3DSurface *lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
1631 } DUMMYUNIONNAME1;
1632 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
1633 union
1635 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
1636 struct IWineD3DSurface *lpDDSZBufferSrc;/* Surface to use as Z buffer for src */
1637 } DUMMYUNIONNAME2;
1638 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1639 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
1640 DWORD dwReserved;
1641 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1642 union
1644 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
1645 struct IWineD3DSurface *lpDDSAlphaDest; /* Surface to use as Alpha Channel */
1646 } DUMMYUNIONNAME3;
1647 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1648 union
1650 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
1651 struct IWineD3DSurface *lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
1652 } DUMMYUNIONNAME4;
1653 union
1655 DWORD dwFillColor; /* color in RGB or Palettized */
1656 DWORD dwFillDepth; /* depth value for z-buffer */
1657 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
1658 struct IWineD3DSurface *lpDDSPattern; /* Surface to use as pattern */
1659 } DUMMYUNIONNAME5;
1660 WINEDDCOLORKEY ddckDestColorkey; /* DestColorkey override */
1661 WINEDDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
1662 } WINEDDBLTFX,*LPWINEDDBLTFX;
1664 typedef struct _WINEDDOVERLAYFX
1666 DWORD dwSize; /* size of structure */
1667 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1668 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
1669 DWORD dwReserved;
1670 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1671 union
1673 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
1674 struct IWineD3DSurface *lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
1675 } DUMMYUNIONNAME1;
1676 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1677 union
1679 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
1680 struct IWineD3DSurface *lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
1681 } DUMMYUNIONNAME2;
1682 WINEDDCOLORKEY dckDestColorkey; /* DestColorkey override */
1683 WINEDDCOLORKEY dckSrcColorkey; /* DestColorkey override */
1684 DWORD dwDDFX; /* Overlay FX */
1685 DWORD dwFlags; /* flags */
1686 } WINEDDOVERLAYFX;
1688 /* dwDDFX */
1689 /* arithmetic stretching along y axis */
1690 #define WINEDDBLTFX_ARITHSTRETCHY 0x00000001
1691 /* mirror on y axis */
1692 #define WINEDDBLTFX_MIRRORLEFTRIGHT 0x00000002
1693 /* mirror on x axis */
1694 #define WINEDDBLTFX_MIRRORUPDOWN 0x00000004
1695 /* do not tear */
1696 #define WINEDDBLTFX_NOTEARING 0x00000008
1697 /* 180 degrees clockwise rotation */
1698 #define WINEDDBLTFX_ROTATE180 0x00000010
1699 /* 270 degrees clockwise rotation */
1700 #define WINEDDBLTFX_ROTATE270 0x00000020
1701 /* 90 degrees clockwise rotation */
1702 #define WINEDDBLTFX_ROTATE90 0x00000040
1703 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1704 #define WINEDDBLTFX_ZBUFFERRANGE 0x00000080
1705 /* add dwZBufferBaseDest to every source z value before compare */
1706 #define WINEDDBLTFX_ZBUFFERBASEDEST 0x00000100
1708 /* dwFlags for Blt* */
1709 #define WINEDDBLT_ALPHADEST 0x00000001
1710 #define WINEDDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
1711 #define WINEDDBLT_ALPHADESTNEG 0x00000004
1712 #define WINEDDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
1713 #define WINEDDBLT_ALPHAEDGEBLEND 0x00000010
1714 #define WINEDDBLT_ALPHASRC 0x00000020
1715 #define WINEDDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
1716 #define WINEDDBLT_ALPHASRCNEG 0x00000080
1717 #define WINEDDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
1718 #define WINEDDBLT_ASYNC 0x00000200
1719 #define WINEDDBLT_COLORFILL 0x00000400
1720 #define WINEDDBLT_DDFX 0x00000800
1721 #define WINEDDBLT_DDROPS 0x00001000
1722 #define WINEDDBLT_KEYDEST 0x00002000
1723 #define WINEDDBLT_KEYDESTOVERRIDE 0x00004000
1724 #define WINEDDBLT_KEYSRC 0x00008000
1725 #define WINEDDBLT_KEYSRCOVERRIDE 0x00010000
1726 #define WINEDDBLT_ROP 0x00020000
1727 #define WINEDDBLT_ROTATIONANGLE 0x00040000
1728 #define WINEDDBLT_ZBUFFER 0x00080000
1729 #define WINEDDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
1730 #define WINEDDBLT_ZBUFFERDESTOVERRIDE 0x00200000
1731 #define WINEDDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
1732 #define WINEDDBLT_ZBUFFERSRCOVERRIDE 0x00800000
1733 #define WINEDDBLT_WAIT 0x01000000
1734 #define WINEDDBLT_DEPTHFILL 0x02000000
1735 #define WINEDDBLT_DONOTWAIT 0x08000000
1737 /* dwTrans for BltFast */
1738 #define WINEDDBLTFAST_NOCOLORKEY 0x00000000
1739 #define WINEDDBLTFAST_SRCCOLORKEY 0x00000001
1740 #define WINEDDBLTFAST_DESTCOLORKEY 0x00000002
1741 #define WINEDDBLTFAST_WAIT 0x00000010
1742 #define WINEDDBLTFAST_DONOTWAIT 0x00000020
1744 /* DDCAPS.dwPalCaps */
1745 #define WINEDDPCAPS_4BIT 0x00000001
1746 #define WINEDDPCAPS_8BITENTRIES 0x00000002
1747 #define WINEDDPCAPS_8BIT 0x00000004
1748 #define WINEDDPCAPS_INITIALIZE 0x00000008
1749 #define WINEDDPCAPS_PRIMARYSURFACE 0x00000010
1750 #define WINEDDPCAPS_PRIMARYSURFACELEFT 0x00000020
1751 #define WINEDDPCAPS_ALLOW256 0x00000040
1752 #define WINEDDPCAPS_VSYNC 0x00000080
1753 #define WINEDDPCAPS_1BIT 0x00000100
1754 #define WINEDDPCAPS_2BIT 0x00000200
1755 #define WINEDDPCAPS_ALPHA 0x00000400
1757 /* DDSURFACEDESC.dwFlags */
1758 #define WINEDDSD_CAPS 0x00000001
1759 #define WINEDDSD_HEIGHT 0x00000002
1760 #define WINEDDSD_WIDTH 0x00000004
1761 #define WINEDDSD_PITCH 0x00000008
1762 #define WINEDDSD_BACKBUFFERCOUNT 0x00000020
1763 #define WINEDDSD_ZBUFFERBITDEPTH 0x00000040
1764 #define WINEDDSD_ALPHABITDEPTH 0x00000080
1765 #define WINEDDSD_LPSURFACE 0x00000800
1766 #define WINEDDSD_PIXELFORMAT 0x00001000
1767 #define WINEDDSD_CKDESTOVERLAY 0x00002000
1768 #define WINEDDSD_CKDESTBLT 0x00004000
1769 #define WINEDDSD_CKSRCOVERLAY 0x00008000
1770 #define WINEDDSD_CKSRCBLT 0x00010000
1771 #define WINEDDSD_MIPMAPCOUNT 0x00020000
1772 #define WINEDDSD_REFRESHRATE 0x00040000
1773 #define WINEDDSD_LINEARSIZE 0x00080000
1774 #define WINEDDSD_TEXTURESTAGE 0x00100000
1775 #define WINEDDSD_FVF 0x00200000
1776 #define WINEDDSD_SRCVBHANDLE 0x00400000
1777 #define WINEDDSD_ALL 0x007ff9ee
1779 /* Set/Get Colour Key Flags */
1780 #define WINEDDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
1781 #define WINEDDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
1782 #define WINEDDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
1783 #define WINEDDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
1784 #define WINEDDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
1786 /* dwFlags for GetBltStatus */
1787 #define WINEDDGBS_CANBLT 0x00000001
1788 #define WINEDDGBS_ISBLTDONE 0x00000002
1790 /* dwFlags for GetFlipStatus */
1791 #define WINEDDGFS_CANFLIP 1L
1792 #define WINEDDGFS_ISFLIPDONE 2L
1794 /* dwFlags for Flip */
1795 #define WINEDDFLIP_WAIT 0x00000001
1796 #define WINEDDFLIP_EVEN 0x00000002 /* only valid for overlay */
1797 #define WINEDDFLIP_ODD 0x00000004 /* only valid for overlay */
1798 #define WINEDDFLIP_NOVSYNC 0x00000008
1799 #define WINEDDFLIP_STEREO 0x00000010
1800 #define WINEDDFLIP_DONOTWAIT 0x00000020
1801 #define WINEDDFLIP_INTERVAL2 0x02000000
1802 #define WINEDDFLIP_INTERVAL3 0x03000000
1803 #define WINEDDFLIP_INTERVAL4 0x04000000
1805 #define WINEDDOVER_ALPHADEST 0x00000001
1806 #define WINEDDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
1807 #define WINEDDOVER_ALPHADESTNEG 0x00000004
1808 #define WINEDDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
1809 #define WINEDDOVER_ALPHAEDGEBLEND 0x00000010
1810 #define WINEDDOVER_ALPHASRC 0x00000020
1811 #define WINEDDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
1812 #define WINEDDOVER_ALPHASRCNEG 0x00000080
1813 #define WINEDDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
1814 #define WINEDDOVER_HIDE 0x00000200
1815 #define WINEDDOVER_KEYDEST 0x00000400
1816 #define WINEDDOVER_KEYDESTOVERRIDE 0x00000800
1817 #define WINEDDOVER_KEYSRC 0x00001000
1818 #define WINEDDOVER_KEYSRCOVERRIDE 0x00002000
1819 #define WINEDDOVER_SHOW 0x00004000
1820 #define WINEDDOVER_ADDDIRTYRECT 0x00008000
1821 #define WINEDDOVER_REFRESHDIRTYRECTS 0x00010000
1822 #define WINEDDOVER_REFRESHALL 0x00020000
1823 #define WINEDDOVER_DDFX 0x00080000
1824 #define WINEDDOVER_AUTOFLIP 0x00100000
1825 #define WINEDDOVER_BOB 0x00200000
1826 #define WINEDDOVER_OVERRIDEBOBWEAVE 0x00400000
1827 #define WINEDDOVER_INTERLEAVED 0x00800000
1829 #endif