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