2 * Direct3D wine types include file
4 * Copyright 2002-2003 The wine-d3d team
5 * Copyright 2002-2003 Jason Edmeades
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
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 {
57 typedef struct _WINED3DVECTOR {
63 typedef struct _WINED3DMATRIX {
66 float _11, _12, _13, _14;
67 float _21, _22, _23, _24;
68 float _31, _32, _33, _34;
69 float _41, _42, _43, _44;
75 typedef struct _WINED3DRECT {
82 typedef struct _WINED3DLIGHT {
83 WINED3DLIGHTTYPE Type;
84 WINED3DCOLORVALUE Diffuse;
85 WINED3DCOLORVALUE Specular;
86 WINED3DCOLORVALUE Ambient;
87 WINED3DVECTOR Position;
88 WINED3DVECTOR Direction;
98 typedef struct _WINED3DMATERIAL {
99 WINED3DCOLORVALUE Diffuse;
100 WINED3DCOLORVALUE Ambient;
101 WINED3DCOLORVALUE Specular;
102 WINED3DCOLORVALUE Emissive;
106 typedef struct _WINED3DVIEWPORT {
115 typedef struct _WINED3DGAMMARAMP {
121 typedef struct _WINED3DLINEPATTERN {
124 } WINED3DLINEPATTERN;
126 #define WINED3D_VSHADER_MAX_CONSTANTS 96
127 #define WINED3D_PSHADER_MAX_CONSTANTS 32
129 typedef struct _WINED3DVECTOR_3 {
135 typedef struct _WINED3DVECTOR_4 {
142 typedef struct WINED3DSHADERVECTOR {
147 } WINED3DSHADERVECTOR;
149 typedef struct WINED3DSHADERSCALAR {
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 ... */
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 ... */
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
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
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,
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,
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,
281 WINED3DFMT_D15S1 = 73,
282 WINED3DFMT_D24S8 = 75,
283 WINED3DFMT_D24X8 = 77,
284 WINED3DFMT_D24X4S4 = 79,
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,
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'),
308 WINED3DFMT_NVHU = WINEMAKEFOURCC('N', 'V', 'H', 'U'),
309 WINED3DFMT_NVHS = WINEMAKEFOURCC('N', 'V', 'H', 'S'),
311 WINED3DFMT_FORCE_DWORD = 0xFFFFFFFF
314 typedef enum _WINED3DRENDERSTATETYPE {
315 WINED3DRS_TEXTUREHANDLE = 1, /* d3d7 */
316 WINED3DRS_ANTIALIAS = 2, /* d3d7 */
317 WINED3DRS_TEXTUREADDRESS = 3, /* d3d7 */
318 WINED3DRS_TEXTUREPERSPECTIVE = 4, /* d3d7 */
319 WINED3DRS_WRAPU = 5, /* d3d7 */
320 WINED3DRS_WRAPV = 6, /* d3d7 */
321 WINED3DRS_ZENABLE = 7,
322 WINED3DRS_FILLMODE = 8,
323 WINED3DRS_SHADEMODE = 9,
324 WINED3DRS_LINEPATTERN = 10, /* d3d7, d3d8 */
325 WINED3DRS_MONOENABLE = 11, /* d3d7 */
326 WINED3DRS_ROP2 = 12, /* d3d7 */
327 WINED3DRS_PLANEMASK = 13, /* d3d7 */
328 WINED3DRS_ZWRITEENABLE = 14,
329 WINED3DRS_ALPHATESTENABLE = 15,
330 WINED3DRS_LASTPIXEL = 16,
331 WINED3DRS_TEXTUREMAG = 17, /* d3d7 */
332 WINED3DRS_TEXTUREMIN = 18, /* d3d7 */
333 WINED3DRS_SRCBLEND = 19,
334 WINED3DRS_DESTBLEND = 20,
335 WINED3DRS_TEXTUREMAPBLEND = 21, /* d3d7 */
336 WINED3DRS_CULLMODE = 22,
337 WINED3DRS_ZFUNC = 23,
338 WINED3DRS_ALPHAREF = 24,
339 WINED3DRS_ALPHAFUNC = 25,
340 WINED3DRS_DITHERENABLE = 26,
341 WINED3DRS_ALPHABLENDENABLE = 27,
342 WINED3DRS_FOGENABLE = 28,
343 WINED3DRS_SPECULARENABLE = 29,
344 WINED3DRS_ZVISIBLE = 30, /* d3d7, d3d8 */
345 WINED3DRS_SUBPIXEL = 31, /* d3d7 */
346 WINED3DRS_SUBPIXELX = 32, /* d3d7 */
347 WINED3DRS_STIPPLEDALPHA = 33, /* d3d7 */
348 WINED3DRS_FOGCOLOR = 34,
349 WINED3DRS_FOGTABLEMODE = 35,
350 WINED3DRS_FOGSTART = 36,
351 WINED3DRS_FOGEND = 37,
352 WINED3DRS_FOGDENSITY = 38,
353 WINED3DRS_STIPPLEENABLE = 39, /* d3d7 */
354 WINED3DRS_EDGEANTIALIAS = 40, /* d3d7, d3d8 */
355 WINED3DRS_COLORKEYENABLE = 41, /* d3d7 */
356 WINED3DRS_BORDERCOLOR = 43, /* d3d7 */
357 WINED3DRS_TEXTUREADDRESSU = 44, /* d3d7 */
358 WINED3DRS_TEXTUREADDRESSV = 45, /* d3d7 */
359 WINED3DRS_MIPMAPLODBIAS = 46, /* d3d7 */
360 WINED3DRS_ZBIAS = 47, /* d3d7, d3d8 */
361 WINED3DRS_RANGEFOGENABLE = 48,
362 WINED3DRS_ANISOTROPY = 49, /* d3d7 */
363 WINED3DRS_FLUSHBATCH = 50, /* d3d7 */
364 WINED3DRS_TRANSLUCENTSORTINDEPENDENT = 51, /* d3d7 */
365 WINED3DRS_STENCILENABLE = 52,
366 WINED3DRS_STENCILFAIL = 53,
367 WINED3DRS_STENCILZFAIL = 54,
368 WINED3DRS_STENCILPASS = 55,
369 WINED3DRS_STENCILFUNC = 56,
370 WINED3DRS_STENCILREF = 57,
371 WINED3DRS_STENCILMASK = 58,
372 WINED3DRS_STENCILWRITEMASK = 59,
373 WINED3DRS_TEXTUREFACTOR = 60,
375 WINED3DRS_STIPPLEPATTERN00 = 64,
376 WINED3DRS_STIPPLEPATTERN01 = 65,
377 WINED3DRS_STIPPLEPATTERN02 = 66,
378 WINED3DRS_STIPPLEPATTERN03 = 67,
379 WINED3DRS_STIPPLEPATTERN04 = 68,
380 WINED3DRS_STIPPLEPATTERN05 = 69,
381 WINED3DRS_STIPPLEPATTERN06 = 70,
382 WINED3DRS_STIPPLEPATTERN07 = 71,
383 WINED3DRS_STIPPLEPATTERN08 = 72,
384 WINED3DRS_STIPPLEPATTERN09 = 73,
385 WINED3DRS_STIPPLEPATTERN10 = 74,
386 WINED3DRS_STIPPLEPATTERN11 = 75,
387 WINED3DRS_STIPPLEPATTERN12 = 76,
388 WINED3DRS_STIPPLEPATTERN13 = 77,
389 WINED3DRS_STIPPLEPATTERN14 = 78,
390 WINED3DRS_STIPPLEPATTERN15 = 79,
391 WINED3DRS_STIPPLEPATTERN16 = 80,
392 WINED3DRS_STIPPLEPATTERN17 = 81,
393 WINED3DRS_STIPPLEPATTERN18 = 82,
394 WINED3DRS_STIPPLEPATTERN19 = 83,
395 WINED3DRS_STIPPLEPATTERN20 = 84,
396 WINED3DRS_STIPPLEPATTERN21 = 85,
397 WINED3DRS_STIPPLEPATTERN22 = 86,
398 WINED3DRS_STIPPLEPATTERN23 = 87,
399 WINED3DRS_STIPPLEPATTERN24 = 88,
400 WINED3DRS_STIPPLEPATTERN25 = 89,
401 WINED3DRS_STIPPLEPATTERN26 = 90,
402 WINED3DRS_STIPPLEPATTERN27 = 91,
403 WINED3DRS_STIPPLEPATTERN28 = 92,
404 WINED3DRS_STIPPLEPATTERN29 = 93,
405 WINED3DRS_STIPPLEPATTERN30 = 94,
406 WINED3DRS_STIPPLEPATTERN31 = 95,
408 WINED3DRS_WRAP0 = 128,
409 WINED3DRS_WRAP1 = 129,
410 WINED3DRS_WRAP2 = 130,
411 WINED3DRS_WRAP3 = 131,
412 WINED3DRS_WRAP4 = 132,
413 WINED3DRS_WRAP5 = 133,
414 WINED3DRS_WRAP6 = 134,
415 WINED3DRS_WRAP7 = 135,
416 WINED3DRS_CLIPPING = 136,
417 WINED3DRS_LIGHTING = 137,
418 WINED3DRS_EXTENTS = 138, /* d3d7 */
419 WINED3DRS_AMBIENT = 139,
420 WINED3DRS_FOGVERTEXMODE = 140,
421 WINED3DRS_COLORVERTEX = 141,
422 WINED3DRS_LOCALVIEWER = 142,
423 WINED3DRS_NORMALIZENORMALS = 143,
424 WINED3DRS_COLORKEYBLENDENABLE = 144, /* d3d7 */
425 WINED3DRS_DIFFUSEMATERIALSOURCE = 145,
426 WINED3DRS_SPECULARMATERIALSOURCE = 146,
427 WINED3DRS_AMBIENTMATERIALSOURCE = 147,
428 WINED3DRS_EMISSIVEMATERIALSOURCE = 148,
429 WINED3DRS_VERTEXBLEND = 151,
430 WINED3DRS_CLIPPLANEENABLE = 152,
431 WINED3DRS_SOFTWAREVERTEXPROCESSING = 153, /* d3d8 */
432 WINED3DRS_POINTSIZE = 154,
433 WINED3DRS_POINTSIZE_MIN = 155,
434 WINED3DRS_POINTSPRITEENABLE = 156,
435 WINED3DRS_POINTSCALEENABLE = 157,
436 WINED3DRS_POINTSCALE_A = 158,
437 WINED3DRS_POINTSCALE_B = 159,
438 WINED3DRS_POINTSCALE_C = 160,
439 WINED3DRS_MULTISAMPLEANTIALIAS = 161,
440 WINED3DRS_MULTISAMPLEMASK = 162,
441 WINED3DRS_PATCHEDGESTYLE = 163,
442 WINED3DRS_PATCHSEGMENTS = 164, /* d3d8 */
443 WINED3DRS_DEBUGMONITORTOKEN = 165,
444 WINED3DRS_POINTSIZE_MAX = 166,
445 WINED3DRS_INDEXEDVERTEXBLENDENABLE = 167,
446 WINED3DRS_COLORWRITEENABLE = 168,
447 WINED3DRS_TWEENFACTOR = 170,
448 WINED3DRS_BLENDOP = 171,
449 WINED3DRS_POSITIONORDER = 172,
450 WINED3DRS_NORMALORDER = 173,
451 WINED3DRS_POSITIONDEGREE = 172,
452 WINED3DRS_NORMALDEGREE = 173,
453 WINED3DRS_SCISSORTESTENABLE = 174,
454 WINED3DRS_SLOPESCALEDEPTHBIAS = 175,
455 WINED3DRS_ANTIALIASEDLINEENABLE = 176,
456 WINED3DRS_MINTESSELLATIONLEVEL = 178,
457 WINED3DRS_MAXTESSELLATIONLEVEL = 179,
458 WINED3DRS_ADAPTIVETESS_X = 180,
459 WINED3DRS_ADAPTIVETESS_Y = 181,
460 WINED3DRS_ADAPTIVETESS_Z = 182,
461 WINED3DRS_ADAPTIVETESS_W = 183,
462 WINED3DRS_ENABLEADAPTIVETESSELLATION= 184,
463 WINED3DRS_TWOSIDEDSTENCILMODE = 185,
464 WINED3DRS_CCW_STENCILFAIL = 186,
465 WINED3DRS_CCW_STENCILZFAIL = 187,
466 WINED3DRS_CCW_STENCILPASS = 188,
467 WINED3DRS_CCW_STENCILFUNC = 189,
468 WINED3DRS_COLORWRITEENABLE1 = 190,
469 WINED3DRS_COLORWRITEENABLE2 = 191,
470 WINED3DRS_COLORWRITEENABLE3 = 192,
471 WINED3DRS_BLENDFACTOR = 193,
472 WINED3DRS_SRGBWRITEENABLE = 194,
473 WINED3DRS_DEPTHBIAS = 195,
474 WINED3DRS_WRAP8 = 198,
475 WINED3DRS_WRAP9 = 199,
476 WINED3DRS_WRAP10 = 200,
477 WINED3DRS_WRAP11 = 201,
478 WINED3DRS_WRAP12 = 202,
479 WINED3DRS_WRAP13 = 203,
480 WINED3DRS_WRAP14 = 204,
481 WINED3DRS_WRAP15 = 205,
482 WINED3DRS_SEPARATEALPHABLENDENABLE = 206,
483 WINED3DRS_SRCBLENDALPHA = 207,
484 WINED3DRS_DESTBLENDALPHA = 208,
485 WINED3DRS_BLENDOPALPHA = 209,
487 WINED3DRS_FORCE_DWORD = 0x7fffffff
488 } WINED3DRENDERSTATETYPE;
490 #define WINEHIGHEST_RENDER_STATE WINED3DRS_BLENDOPALPHA
491 /* Highest WINED3DRS_ value */
493 #define WINED3DCOLORWRITEENABLE_RED (1<<0)
494 #define WINED3DCOLORWRITEENABLE_GREEN (1<<1)
495 #define WINED3DCOLORWRITEENABLE_BLUE (1<<2)
496 #define WINED3DCOLORWRITEENABLE_ALPHA (1<<3)
498 typedef enum _WINED3DBLEND {
499 WINED3DBLEND_ZERO = 1,
500 WINED3DBLEND_ONE = 2,
501 WINED3DBLEND_SRCCOLOR = 3,
502 WINED3DBLEND_INVSRCCOLOR = 4,
503 WINED3DBLEND_SRCALPHA = 5,
504 WINED3DBLEND_INVSRCALPHA = 6,
505 WINED3DBLEND_DESTALPHA = 7,
506 WINED3DBLEND_INVDESTALPHA = 8,
507 WINED3DBLEND_DESTCOLOR = 9,
508 WINED3DBLEND_INVDESTCOLOR = 10,
509 WINED3DBLEND_SRCALPHASAT = 11,
510 WINED3DBLEND_BOTHSRCALPHA = 12,
511 WINED3DBLEND_BOTHINVSRCALPHA = 13,
512 WINED3DBLEND_BLENDFACTOR = 14,
513 WINED3DBLEND_INVBLENDFACTOR = 15,
514 WINED3DBLEND_FORCE_DWORD = 0x7fffffff
517 typedef enum _WINED3DBLENDOP {
518 WINED3DBLENDOP_ADD = 1,
519 WINED3DBLENDOP_SUBTRACT = 2,
520 WINED3DBLENDOP_REVSUBTRACT = 3,
521 WINED3DBLENDOP_MIN = 4,
522 WINED3DBLENDOP_MAX = 5,
524 WINED3DBLENDOP_FORCE_DWORD = 0x7fffffff
527 typedef enum _WINED3DVERTEXBLENDFLAGS {
528 WINED3DVBF_DISABLE = 0,
529 WINED3DVBF_1WEIGHTS = 1,
530 WINED3DVBF_2WEIGHTS = 2,
531 WINED3DVBF_3WEIGHTS = 3,
532 WINED3DVBF_TWEENING = 255,
533 WINED3DVBF_0WEIGHTS = 256
534 } WINED3DVERTEXBLENDFLAGS;
536 typedef enum _WINED3DCMPFUNC {
537 WINED3DCMP_NEVER = 1,
539 WINED3DCMP_EQUAL = 3,
540 WINED3DCMP_LESSEQUAL = 4,
541 WINED3DCMP_GREATER = 5,
542 WINED3DCMP_NOTEQUAL = 6,
543 WINED3DCMP_GREATEREQUAL = 7,
544 WINED3DCMP_ALWAYS = 8,
546 WINED3DCMP_FORCE_DWORD = 0x7fffffff
549 typedef enum _WINED3DZBUFFERTYPE {
554 WINED3DZB_FORCE_DWORD = 0x7fffffff
555 } WINED3DZBUFFERTYPE;
557 typedef enum _WINED3DFOGMODE {
561 WINED3DFOG_LINEAR = 3,
563 WINED3DFOG_FORCE_DWORD = 0x7fffffff
566 typedef enum _WINED3DSHADEMODE {
567 WINED3DSHADE_FLAT = 1,
568 WINED3DSHADE_GOURAUD = 2,
569 WINED3DSHADE_PHONG = 3,
571 WINED3DSHADE_FORCE_DWORD = 0x7fffffff
574 typedef enum _WINED3DFILLMODE {
575 WINED3DFILL_POINT = 1,
576 WINED3DFILL_WIREFRAME = 2,
577 WINED3DFILL_SOLID = 3,
579 WINED3DFILL_FORCE_DWORD = 0x7fffffff
582 typedef enum _WINED3DCULL {
583 WINED3DCULL_NONE = 1,
587 WINED3DCULL_FORCE_DWORD = 0x7fffffff
590 typedef enum _WINED3DSTENCILOP {
591 WINED3DSTENCILOP_KEEP = 1,
592 WINED3DSTENCILOP_ZERO = 2,
593 WINED3DSTENCILOP_REPLACE = 3,
594 WINED3DSTENCILOP_INCRSAT = 4,
595 WINED3DSTENCILOP_DECRSAT = 5,
596 WINED3DSTENCILOP_INVERT = 6,
597 WINED3DSTENCILOP_INCR = 7,
598 WINED3DSTENCILOP_DECR = 8,
600 WINED3DSTENCILOP_FORCE_DWORD = 0x7fffffff
603 typedef enum _WINED3DMATERIALCOLORSOURCE {
604 WINED3DMCS_MATERIAL = 0,
605 WINED3DMCS_COLOR1 = 1,
606 WINED3DMCS_COLOR2 = 2,
608 WINED3DMCS_FORCE_DWORD = 0x7fffffff
609 } WINED3DMATERIALCOLORSOURCE;
611 typedef enum _WINED3DPATCHEDGESTYLE {
612 WINED3DPATCHEDGE_DISCRETE = 0,
613 WINED3DPATCHEDGE_CONTINUOUS = 1,
615 WINED3DPATCHEDGE_FORCE_DWORD = 0x7fffffff,
616 } WINED3DPATCHEDGESTYLE;
618 typedef struct _WINED3DDISPLAYMODE {
622 WINED3DFORMAT Format;
623 } WINED3DDISPLAYMODE;
625 typedef enum _WINED3DBACKBUFFER_TYPE {
626 WINED3DBACKBUFFER_TYPE_MONO = 0,
627 WINED3DBACKBUFFER_TYPE_LEFT = 1,
628 WINED3DBACKBUFFER_TYPE_RIGHT = 2,
630 WINED3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff
631 } WINED3DBACKBUFFER_TYPE;
633 #define WINED3DADAPTER_DEFAULT 0
634 #define WINED3DENUM_NO_WHQL_LEVEL 2
635 #define WINED3DPRESENT_BACK_BUFFER_MAX 3
637 typedef enum _WINED3DSWAPEFFECT {
638 WINED3DSWAPEFFECT_DISCARD = 1,
639 WINED3DSWAPEFFECT_FLIP = 2,
640 WINED3DSWAPEFFECT_COPY = 3,
641 WINED3DSWAPEFFECT_COPY_VSYNC = 4,
642 WINED3DSWAPEFFECT_FORCE_DWORD = 0xFFFFFFFF
645 typedef enum _WINED3DSAMPLERSTATETYPE {
646 WINED3DSAMP_ADDRESSU = 1,
647 WINED3DSAMP_ADDRESSV = 2,
648 WINED3DSAMP_ADDRESSW = 3,
649 WINED3DSAMP_BORDERCOLOR = 4,
650 WINED3DSAMP_MAGFILTER = 5,
651 WINED3DSAMP_MINFILTER = 6,
652 WINED3DSAMP_MIPFILTER = 7,
653 WINED3DSAMP_MIPMAPLODBIAS = 8,
654 WINED3DSAMP_MAXMIPLEVEL = 9,
655 WINED3DSAMP_MAXANISOTROPY = 10,
656 WINED3DSAMP_SRGBTEXTURE = 11,
657 WINED3DSAMP_ELEMENTINDEX = 12,
658 WINED3DSAMP_DMAPOFFSET = 13,
660 WINED3DSAMP_FORCE_DWORD = 0x7fffffff,
661 } WINED3DSAMPLERSTATETYPE;
662 #define WINED3D_HIGHEST_SAMPLER_STATE WINED3DSAMP_DMAPOFFSET
664 typedef enum _WINED3DMULTISAMPLE_TYPE {
665 WINED3DMULTISAMPLE_NONE = 0,
666 WINED3DMULTISAMPLE_NONMASKABLE = 1,
667 WINED3DMULTISAMPLE_2_SAMPLES = 2,
668 WINED3DMULTISAMPLE_3_SAMPLES = 3,
669 WINED3DMULTISAMPLE_4_SAMPLES = 4,
670 WINED3DMULTISAMPLE_5_SAMPLES = 5,
671 WINED3DMULTISAMPLE_6_SAMPLES = 6,
672 WINED3DMULTISAMPLE_7_SAMPLES = 7,
673 WINED3DMULTISAMPLE_8_SAMPLES = 8,
674 WINED3DMULTISAMPLE_9_SAMPLES = 9,
675 WINED3DMULTISAMPLE_10_SAMPLES = 10,
676 WINED3DMULTISAMPLE_11_SAMPLES = 11,
677 WINED3DMULTISAMPLE_12_SAMPLES = 12,
678 WINED3DMULTISAMPLE_13_SAMPLES = 13,
679 WINED3DMULTISAMPLE_14_SAMPLES = 14,
680 WINED3DMULTISAMPLE_15_SAMPLES = 15,
681 WINED3DMULTISAMPLE_16_SAMPLES = 16,
683 WINED3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
684 } WINED3DMULTISAMPLE_TYPE;
686 typedef enum _WINED3DTEXTURESTAGESTATETYPE {
687 WINED3DTSS_COLOROP = 1,
688 WINED3DTSS_COLORARG1 = 2,
689 WINED3DTSS_COLORARG2 = 3,
690 WINED3DTSS_ALPHAOP = 4,
691 WINED3DTSS_ALPHAARG1 = 5,
692 WINED3DTSS_ALPHAARG2 = 6,
693 WINED3DTSS_BUMPENVMAT00 = 7,
694 WINED3DTSS_BUMPENVMAT01 = 8,
695 WINED3DTSS_BUMPENVMAT10 = 9,
696 WINED3DTSS_BUMPENVMAT11 = 10,
697 WINED3DTSS_TEXCOORDINDEX = 11,
698 WINED3DTSS_ADDRESS = 12,
699 WINED3DTSS_ADDRESSU = 13,
700 WINED3DTSS_ADDRESSV = 14,
701 WINED3DTSS_BORDERCOLOR = 15,
702 WINED3DTSS_MAGFILTER = 16,
703 WINED3DTSS_MINFILTER = 17,
704 WINED3DTSS_MIPFILTER = 18,
705 WINED3DTSS_MIPMAPLODBIAS = 19,
706 WINED3DTSS_MAXMIPLEVEL = 20,
707 WINED3DTSS_MAXANISOTROPY = 21,
708 WINED3DTSS_BUMPENVLSCALE = 22,
709 WINED3DTSS_BUMPENVLOFFSET = 23,
710 WINED3DTSS_TEXTURETRANSFORMFLAGS = 24,
711 WINED3DTSS_ADDRESSW = 25,
712 WINED3DTSS_COLORARG0 = 26,
713 WINED3DTSS_ALPHAARG0 = 27,
714 WINED3DTSS_RESULTARG = 28,
715 WINED3DTSS_CONSTANT = 32,
717 WINED3DTSS_FORCE_DWORD = 0x7fffffff
718 } WINED3DTEXTURESTAGESTATETYPE;
720 #define WINED3DTSS_TCI_PASSTHRU 0x00000
721 #define WINED3DTSS_TCI_CAMERASPACENORMAL 0x10000
722 #define WINED3DTSS_TCI_CAMERASPACEPOSITION 0x20000
723 #define WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x30000
724 #define WINED3DTSS_TCI_SPHEREMAP 0x40000
726 #define WINED3D_HIGHEST_TEXTURE_STATE WINED3DTSS_CONSTANT
728 typedef enum _WINED3DTEXTURETRANSFORMFLAGS {
729 WINED3DTTFF_DISABLE = 0,
730 WINED3DTTFF_COUNT1 = 1,
731 WINED3DTTFF_COUNT2 = 2,
732 WINED3DTTFF_COUNT3 = 3,
733 WINED3DTTFF_COUNT4 = 4,
734 WINED3DTTFF_PROJECTED = 256,
736 WINED3DTTFF_FORCE_DWORD = 0x7fffffff
737 } WINED3DTEXTURETRANSFORMFLAGS;
739 typedef enum _WINED3DTEXTUREOP {
740 WINED3DTOP_DISABLE = 1,
741 WINED3DTOP_SELECTARG1 = 2,
742 WINED3DTOP_SELECTARG2 = 3,
743 WINED3DTOP_MODULATE = 4,
744 WINED3DTOP_MODULATE2X = 5,
745 WINED3DTOP_MODULATE4X = 6,
747 WINED3DTOP_ADDSIGNED = 8,
748 WINED3DTOP_ADDSIGNED2X = 9,
749 WINED3DTOP_SUBTRACT = 10,
750 WINED3DTOP_ADDSMOOTH = 11,
751 WINED3DTOP_BLENDDIFFUSEALPHA = 12,
752 WINED3DTOP_BLENDTEXTUREALPHA = 13,
753 WINED3DTOP_BLENDFACTORALPHA = 14,
754 WINED3DTOP_BLENDTEXTUREALPHAPM = 15,
755 WINED3DTOP_BLENDCURRENTALPHA = 16,
756 WINED3DTOP_PREMODULATE = 17,
757 WINED3DTOP_MODULATEALPHA_ADDCOLOR = 18,
758 WINED3DTOP_MODULATECOLOR_ADDALPHA = 19,
759 WINED3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
760 WINED3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
761 WINED3DTOP_BUMPENVMAP = 22,
762 WINED3DTOP_BUMPENVMAPLUMINANCE = 23,
763 WINED3DTOP_DOTPRODUCT3 = 24,
764 WINED3DTOP_MULTIPLYADD = 25,
765 WINED3DTOP_LERP = 26,
767 WINED3DTOP_FORCE_DWORD = 0x7fffffff,
770 #define WINED3DTA_SELECTMASK 0x0000000f
771 #define WINED3DTA_DIFFUSE 0x00000000
772 #define WINED3DTA_CURRENT 0x00000001
773 #define WINED3DTA_TEXTURE 0x00000002
774 #define WINED3DTA_TFACTOR 0x00000003
775 #define WINED3DTA_SPECULAR 0x00000004
776 #define WINED3DTA_TEMP 0x00000005
777 #define WINED3DTA_CONSTANT 0x00000006
778 #define WINED3DTA_COMPLEMENT 0x00000010
779 #define WINED3DTA_ALPHAREPLICATE 0x00000020
781 typedef enum _WINED3DTEXTUREADDRESS {
782 WINED3DTADDRESS_WRAP = 1,
783 WINED3DTADDRESS_MIRROR = 2,
784 WINED3DTADDRESS_CLAMP = 3,
785 WINED3DTADDRESS_BORDER = 4,
786 WINED3DTADDRESS_MIRRORONCE = 5,
788 WINED3DTADDRESS_FORCE_DWORD = 0x7fffffff
789 } WINED3DTEXTUREADDRESS;
791 typedef enum _WINED3DTRANSFORMSTATETYPE {
793 WINED3DTS_PROJECTION = 3,
794 WINED3DTS_TEXTURE0 = 16,
795 WINED3DTS_TEXTURE1 = 17,
796 WINED3DTS_TEXTURE2 = 18,
797 WINED3DTS_TEXTURE3 = 19,
798 WINED3DTS_TEXTURE4 = 20,
799 WINED3DTS_TEXTURE5 = 21,
800 WINED3DTS_TEXTURE6 = 22,
801 WINED3DTS_TEXTURE7 = 23,
803 WINED3DTS_FORCE_DWORD = 0x7fffffff
804 } WINED3DTRANSFORMSTATETYPE;
806 #define WINED3DTS_WORLD WINED3DTS_WORLDMATRIX(0)
807 #define WINED3DTS_WORLD1 WINED3DTS_WORLDMATRIX(1)
808 #define WINED3DTS_WORLD2 WINED3DTS_WORLDMATRIX(2)
809 #define WINED3DTS_WORLD3 WINED3DTS_WORLDMATRIX(3)
810 #define WINED3DTS_WORLDMATRIX(index) (WINED3DTRANSFORMSTATETYPE)(index + 256)
812 typedef enum _WINED3DBASISTYPE {
813 WINED3DBASIS_BEZIER = 0,
814 WINED3DBASIS_BSPLINE = 1,
815 WINED3DBASIS_INTERPOLATE = 2,
817 WINED3DBASIS_FORCE_DWORD = 0x7fffffff
820 typedef enum _WINED3DCUBEMAP_FACES {
821 WINED3DCUBEMAP_FACE_POSITIVE_X = 0,
822 WINED3DCUBEMAP_FACE_NEGATIVE_X = 1,
823 WINED3DCUBEMAP_FACE_POSITIVE_Y = 2,
824 WINED3DCUBEMAP_FACE_NEGATIVE_Y = 3,
825 WINED3DCUBEMAP_FACE_POSITIVE_Z = 4,
826 WINED3DCUBEMAP_FACE_NEGATIVE_Z = 5,
828 WINED3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff
829 } WINED3DCUBEMAP_FACES;
831 typedef enum _WINED3DTEXTUREFILTERTYPE {
832 WINED3DTEXF_NONE = 0,
833 WINED3DTEXF_POINT = 1,
834 WINED3DTEXF_LINEAR = 2,
835 WINED3DTEXF_ANISOTROPIC = 3,
836 WINED3DTEXF_FLATCUBIC = 4,
837 WINED3DTEXF_GAUSSIANCUBIC = 5,
838 WINED3DTEXF_PYRAMIDALQUAD = 6,
839 WINED3DTEXF_GAUSSIANQUAD = 7,
840 WINED3DTEXF_FORCE_DWORD = 0x7fffffff
841 } WINED3DTEXTUREFILTERTYPE;
843 typedef struct _WINEDD3DRECTPATCH_INFO {
844 UINT StartVertexOffsetWidth;
845 UINT StartVertexOffsetHeight;
849 WINED3DBASISTYPE Basis;
850 WINED3DDEGREETYPE Degree;
851 } WINED3DRECTPATCH_INFO;
853 typedef struct _WINED3DTRIPATCH_INFO {
854 UINT StartVertexOffset;
856 WINED3DBASISTYPE Basis;
857 WINED3DDEGREETYPE Degree;
858 } WINED3DTRIPATCH_INFO;
861 typedef struct _WINED3DADAPTER_IDENTIFIER {
865 LARGE_INTEGER *DriverVersion;
870 GUID *DeviceIdentifier;
872 } WINED3DADAPTER_IDENTIFIER;
874 typedef struct _WINED3DPRESENT_PARAMETERS {
875 UINT BackBufferWidth;
876 UINT BackBufferHeight;
877 WINED3DFORMAT BackBufferFormat;
878 UINT BackBufferCount;
879 WINED3DMULTISAMPLE_TYPE MultiSampleType;
880 DWORD MultiSampleQuality;
881 WINED3DSWAPEFFECT SwapEffect;
884 BOOL EnableAutoDepthStencil;
885 WINED3DFORMAT AutoDepthStencilFormat;
887 UINT FullScreen_RefreshRateInHz;
888 UINT PresentationInterval;
889 } WINED3DPRESENT_PARAMETERS;
891 typedef enum _WINED3DRESOURCETYPE {
892 WINED3DRTYPE_SURFACE = 1,
893 WINED3DRTYPE_VOLUME = 2,
894 WINED3DRTYPE_TEXTURE = 3,
895 WINED3DRTYPE_VOLUMETEXTURE = 4,
896 WINED3DRTYPE_CUBETEXTURE = 5,
897 WINED3DRTYPE_VERTEXBUFFER = 6,
898 WINED3DRTYPE_INDEXBUFFER = 7,
900 WINED3DRTYPE_FORCE_DWORD = 0x7fffffff
901 } WINED3DRESOURCETYPE;
903 #define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER+1)
905 typedef enum _WINED3DPOOL {
906 WINED3DPOOL_DEFAULT = 0,
907 WINED3DPOOL_MANAGED = 1,
908 WINED3DPOOL_SYSTEMMEM = 2,
909 WINED3DPOOL_SCRATCH = 3,
911 WINED3DPOOL_FORCE_DWORD = 0x7fffffff
914 typedef struct _WINED3DSURFACE_DESC
916 WINED3DFORMAT *Format;
917 WINED3DRESOURCETYPE *Type;
922 WINED3DMULTISAMPLE_TYPE *MultiSampleType;
923 DWORD *MultiSampleQuality;
926 } WINED3DSURFACE_DESC;
928 typedef struct _WINED3DVOLUME_DESC
930 WINED3DFORMAT *Format;
931 WINED3DRESOURCETYPE *Type;
939 } WINED3DVOLUME_DESC;
941 typedef struct _WINED3DCLIPSTATUS {
943 DWORD ClipIntersection;
947 typedef struct _WINED3DVERTEXELEMENT {
954 int Reg; /* DirectX 8 */
955 } WINED3DVERTEXELEMENT, *LPWINED3DVERTEXELEMENT;
958 typedef enum _WINED3DQUERYTYPE {
959 WINED3DQUERYTYPE_VCACHE = 4,
960 WINED3DQUERYTYPE_RESOURCEMANAGER = 5,
961 WINED3DQUERYTYPE_VERTEXSTATS = 6,
962 WINED3DQUERYTYPE_EVENT = 8,
963 WINED3DQUERYTYPE_OCCLUSION = 9,
964 WINED3DQUERYTYPE_TIMESTAMP = 10,
965 WINED3DQUERYTYPE_TIMESTAMPDISJOINT = 11,
966 WINED3DQUERYTYPE_TIMESTAMPFREQ = 12,
967 WINED3DQUERYTYPE_PIPELINETIMINGS = 13,
968 WINED3DQUERYTYPE_INTERFACETIMINGS = 14,
969 WINED3DQUERYTYPE_VERTEXTIMINGS = 15,
970 WINED3DQUERYTYPE_PIXELTIMINGS = 16,
971 WINED3DQUERYTYPE_BANDWIDTHTIMINGS = 17,
972 WINED3DQUERYTYPE_CACHEUTILIZATION = 18
975 #define WINED3DISSUE_BEGIN (1 << 1)
976 #define WINED3DISSUE_END (1 << 0)
977 #define WINED3DGETDATA_FLUSH (1 << 0)
979 typedef struct _WINED3DDEVICE_CREATION_PARAMETERS {
981 WINED3DDEVTYPE DeviceType;
984 } WINED3DDEVICE_CREATION_PARAMETERS;
986 typedef struct _WINED3DDEVINFO_BANDWIDTHTIMINGS {
987 float MaxBandwidthUtilized;
988 float FrontEndUploadMemoryUtilizedPercent;
989 float VertexRateUtilizedPercent;
990 float TriangleSetupRateUtilizedPercent;
991 float FillRateUtilizedPercent;
992 } WINED3DDEVINFO_BANDWIDTHTIMINGS;
994 typedef struct _WINED3DDEVINFO_CACHEUTILIZATION {
995 float TextureCacheHitRate;
996 float PostTransformVertexCacheHitRate;
997 } WINED3DDEVINFO_CACHEUTILIZATION;
999 typedef struct _WINED3DDEVINFO_INTERFACETIMINGS {
1000 float WaitingForGPUToUseApplicationResourceTimePercent;
1001 float WaitingForGPUToAcceptMoreCommandsTimePercent;
1002 float WaitingForGPUToStayWithinLatencyTimePercent;
1003 float WaitingForGPUExclusiveResourceTimePercent;
1004 float WaitingForGPUOtherTimePercent;
1005 } WINED3DDEVINFO_INTERFACETIMINGS;
1007 typedef struct _WINED3DDEVINFO_PIPELINETIMINGS {
1008 float VertexProcessingTimePercent;
1009 float PixelProcessingTimePercent;
1010 float OtherGPUProcessingTimePercent;
1011 float GPUIdleTimePercent;
1012 } WINED3DDEVINFO_PIPELINETIMINGS;
1014 typedef struct _WINED3DDEVINFO_STAGETIMINGS {
1015 float MemoryProcessingPercent;
1016 float ComputationProcessingPercent;
1017 } WINED3DDEVINFO_STAGETIMINGS;
1019 typedef struct _WINED3DRASTER_STATUS {
1022 } WINED3DRASTER_STATUS;
1025 typedef struct WINED3DRESOURCESTATS {
1027 DWORD ApproxBytesDownloaded;
1029 DWORD NumVidCreates;
1032 DWORD NumUsedInVidMem;
1034 DWORD WorkingSetBytes;
1037 } WINED3DRESOURCESTATS;
1039 typedef struct _WINED3DDEVINFO_RESOURCEMANAGER {
1040 WINED3DRESOURCESTATS stats[WINED3DRTYPECOUNT];
1041 } WINED3DDEVINFO_RESOURCEMANAGER;
1043 typedef struct _WINED3DDEVINFO_VERTEXSTATS {
1044 DWORD NumRenderedTriangles;
1045 DWORD NumExtraClippingTriangles;
1046 } WINED3DDEVINFO_VERTEXSTATS;
1048 typedef struct _WINED3DLOCKED_RECT {
1051 } WINED3DLOCKED_RECT;
1053 typedef struct _WINED3DLOCKED_BOX {
1057 } WINED3DLOCKED_BOX;
1060 typedef struct _WINED3DBOX {
1069 /*Vertex cache optimization hints.*/
1070 typedef struct WINED3DDEVINFO_VCACHE {
1071 /*Must be a 4 char code FOURCC (e.g. CACH)*/
1073 /*0 to get the longest strips, 1 vertex cache*/
1075 /*Cache size to use (only valid if OptMethod==1) */
1077 /*internal for deciding when to restart strips, non user modifyable (only valid if OptMethod==1)*/
1079 } WINED3DDEVINFO_VCACHE;
1081 typedef struct _WINED3DVERTEXBUFFER_DESC {
1082 WINED3DFORMAT Format;
1083 WINED3DRESOURCETYPE Type;
1088 } WINED3DVERTEXBUFFER_DESC;
1090 typedef struct _WINED3DINDEXBUFFER_DESC {
1091 WINED3DFORMAT Format;
1092 WINED3DRESOURCETYPE Type;
1096 } WINED3DINDEXBUFFER_DESC;
1099 * The wined3dcaps structure
1102 typedef struct _WINED3DVSHADERCAPS2_0 {
1104 INT DynamicFlowControlDepth;
1106 INT StaticFlowControlDepth;
1107 } WINED3DVSHADERCAPS2_0;
1109 typedef struct _WINED3DPSHADERCAPS2_0 {
1111 INT DynamicFlowControlDepth;
1113 INT StaticFlowControlDepth;
1114 INT NumInstructionSlots;
1115 } WINED3DPSHADERCAPS2_0;
1117 typedef struct _WINEDDCAPS {
1138 typedef struct _WINED3DCAPS {
1139 WINED3DDEVTYPE DeviceType;
1140 UINT AdapterOrdinal;
1145 DWORD PresentationIntervals;
1151 DWORD PrimitiveMiscCaps;
1155 DWORD DestBlendCaps;
1159 DWORD TextureFilterCaps;
1160 DWORD CubeTextureFilterCaps;
1161 DWORD VolumeTextureFilterCaps;
1162 DWORD TextureAddressCaps;
1163 DWORD VolumeTextureAddressCaps;
1167 DWORD MaxTextureWidth;
1168 DWORD MaxTextureHeight;
1169 DWORD MaxVolumeExtent;
1171 DWORD MaxTextureRepeat;
1172 DWORD MaxTextureAspectRatio;
1173 DWORD MaxAnisotropy;
1176 float GuardBandLeft;
1178 float GuardBandRight;
1179 float GuardBandBottom;
1181 float ExtentsAdjust;
1185 DWORD TextureOpCaps;
1186 DWORD MaxTextureBlendStages;
1187 DWORD MaxSimultaneousTextures;
1189 DWORD VertexProcessingCaps;
1190 DWORD MaxActiveLights;
1191 DWORD MaxUserClipPlanes;
1192 DWORD MaxVertexBlendMatrices;
1193 DWORD MaxVertexBlendMatrixIndex;
1197 DWORD MaxPrimitiveCount;
1198 DWORD MaxVertexIndex;
1200 DWORD MaxStreamStride;
1202 DWORD VertexShaderVersion;
1203 DWORD MaxVertexShaderConst;
1205 DWORD PixelShaderVersion;
1206 float PixelShader1xMaxValue;
1211 float MaxNpatchTessellationLevel;
1212 DWORD Reserved5; /*undocumented*/
1214 UINT MasterAdapterOrdinal;
1215 UINT AdapterOrdinalInGroup;
1216 UINT NumberOfAdaptersInGroup;
1218 DWORD NumSimultaneousRTs;
1219 DWORD StretchRectFilterCaps;
1220 WINED3DVSHADERCAPS2_0 VS20Caps;
1221 WINED3DPSHADERCAPS2_0 PS20Caps;
1222 DWORD VertexTextureFilterCaps;
1223 DWORD MaxVShaderInstructionsExecuted;
1224 DWORD MaxPShaderInstructionsExecuted;
1225 DWORD MaxVertexShader30InstructionSlots;
1226 DWORD MaxPixelShader30InstructionSlots;
1227 DWORD Reserved2;/* Not in the microsoft headers but documented */
1230 WINEDDCAPS DirectDrawCaps;
1233 typedef enum _WINED3DSTATEBLOCKTYPE {
1234 WINED3DSBT_INIT = 0,
1236 WINED3DSBT_PIXELSTATE = 2,
1237 WINED3DSBT_VERTEXSTATE = 3,
1238 WINED3DSBT_RECORDED = 4, /* WineD3D private */
1240 WINED3DSBT_FORCE_DWORD = 0xffffffff
1241 } WINED3DSTATEBLOCKTYPE;
1243 typedef struct glDescriptor {
1247 int/*GLenum*/ glFormat;
1248 int/*GLenum*/ glFormatInternal;
1249 int/*GLenum*/ glType;
1252 #define WINED3DDP_MAXTEXCOORD 8
1254 typedef enum _WINED3DDECLMETHOD {
1255 WINED3DDECLMETHOD_DEFAULT = 0,
1256 WINED3DDECLMETHOD_PARTIALU = 1,
1257 WINED3DDECLMETHOD_PARTIALV = 2,
1258 WINED3DDECLMETHOD_CROSSUV = 3,
1259 WINED3DDECLMETHOD_UV = 4,
1260 WINED3DDECLMETHOD_LOOKUP = 5,
1261 WINED3DDECLMETHOD_LOOKUPPRESAMPLED = 6
1262 } WINED3DDECLMETHOD;
1264 typedef enum _WINED3DDECLTYPE {
1265 WINED3DDECLTYPE_FLOAT1 = 0,
1266 WINED3DDECLTYPE_FLOAT2 = 1,
1267 WINED3DDECLTYPE_FLOAT3 = 2,
1268 WINED3DDECLTYPE_FLOAT4 = 3,
1269 WINED3DDECLTYPE_D3DCOLOR = 4,
1270 WINED3DDECLTYPE_UBYTE4 = 5,
1271 WINED3DDECLTYPE_SHORT2 = 6,
1272 WINED3DDECLTYPE_SHORT4 = 7,
1274 WINED3DDECLTYPE_UBYTE4N = 8,
1275 WINED3DDECLTYPE_SHORT2N = 9,
1276 WINED3DDECLTYPE_SHORT4N = 10,
1277 WINED3DDECLTYPE_USHORT2N = 11,
1278 WINED3DDECLTYPE_USHORT4N = 12,
1279 WINED3DDECLTYPE_UDEC3 = 13,
1280 WINED3DDECLTYPE_DEC3N = 14,
1281 WINED3DDECLTYPE_FLOAT16_2 = 15,
1282 WINED3DDECLTYPE_FLOAT16_4 = 16,
1283 WINED3DDECLTYPE_UNUSED = 17,
1286 #define WINED3DDECL_END() {0xFF,0,WINED3DDECLTYPE_UNUSED,0,0,0,-1}
1288 typedef struct WineDirect3DStridedData {
1289 BYTE *lpData; /* Pointer to start of data */
1290 DWORD dwStride; /* Stride between occurrences of this data */
1291 DWORD dwType; /* Type (as in D3DVSDT_TYPE) */
1292 int VBO; /* Vertex buffer object this data is in */
1293 UINT streamNo; /* D3D stream number */
1294 } WineDirect3DStridedData;
1296 typedef struct WineDirect3DVertexStridedData {
1299 * This structure can be accessed in two ways: Named access, and array
1300 * access. Please note that named access is only valid with the fixed
1301 * function vertex pipeline, and the arrays are only valid with the
1302 * programmable vertex pipeline(vertex shaders)
1307 /* Do not add or reorder fields here,
1308 * so this can be indexed as an array */
1309 WineDirect3DStridedData position;
1310 WineDirect3DStridedData blendWeights;
1311 WineDirect3DStridedData blendMatrixIndices;
1312 WineDirect3DStridedData normal;
1313 WineDirect3DStridedData pSize;
1314 WineDirect3DStridedData diffuse;
1315 WineDirect3DStridedData specular;
1316 WineDirect3DStridedData texCoords[WINED3DDP_MAXTEXCOORD];
1317 WineDirect3DStridedData position2; /* tween data */
1318 WineDirect3DStridedData normal2; /* tween data */
1319 WineDirect3DStridedData tangent;
1320 WineDirect3DStridedData binormal;
1321 WineDirect3DStridedData tessFactor;
1322 WineDirect3DStridedData fog;
1323 WineDirect3DStridedData depth;
1324 WineDirect3DStridedData sample;
1326 /* Add fields here */
1327 BOOL position_transformed;
1330 WineDirect3DStridedData input[16]; /* Indexed by constants in D3DVSDE_REGISTER */
1332 } WineDirect3DVertexStridedData;
1335 WINED3DDECLUSAGE_POSITION = 0,
1336 WINED3DDECLUSAGE_BLENDWEIGHT = 1,
1337 WINED3DDECLUSAGE_BLENDINDICES = 2,
1338 WINED3DDECLUSAGE_NORMAL = 3,
1339 WINED3DDECLUSAGE_PSIZE = 4,
1340 WINED3DDECLUSAGE_TEXCOORD = 5,
1341 WINED3DDECLUSAGE_TANGENT = 6,
1342 WINED3DDECLUSAGE_BINORMAL = 7,
1343 WINED3DDECLUSAGE_TESSFACTOR = 8,
1344 WINED3DDECLUSAGE_POSITIONT = 9,
1345 WINED3DDECLUSAGE_COLOR = 10,
1346 WINED3DDECLUSAGE_FOG = 11,
1347 WINED3DDECLUSAGE_DEPTH = 12,
1348 WINED3DDECLUSAGE_SAMPLE = 13
1351 #define WINED3DUSAGE_RENDERTARGET 0x00000001L
1352 #define WINED3DUSAGE_DEPTHSTENCIL 0x00000002L
1353 #define WINED3DUSAGE_WRITEONLY 0x00000008L
1354 #define WINED3DUSAGE_SOFTWAREPROCESSING 0x00000010L
1355 #define WINED3DUSAGE_DONOTCLIP 0x00000020L
1356 #define WINED3DUSAGE_POINTS 0x00000040L
1357 #define WINED3DUSAGE_RTPATCHES 0x00000080L
1358 #define WINED3DUSAGE_NPATCHES 0x00000100L
1359 #define WINED3DUSAGE_DYNAMIC 0x00000200L
1360 #define WINED3DUSAGE_AUTOGENMIPMAP 0x00000400L
1361 #define WINED3DUSAGE_DMAP 0x00004000L
1362 #define WINED3DUSAGE_MASK 0x00004FFFL
1363 #define WINED3DUSAGE_OVERLAY 0x80000000L
1365 #define WINED3DUSAGE_QUERY_LEGACYBUMPMAP 0x00008000L
1366 #define WINED3DUSAGE_QUERY_FILTER 0x00020000L
1367 #define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING 0x00080000L
1368 #define WINED3DUSAGE_QUERY_SRGBREAD 0x00010000L
1369 #define WINED3DUSAGE_QUERY_SRGBWRITE 0x00040000L
1370 #define WINED3DUSAGE_QUERY_VERTEXTEXTURE 0x00100000L
1371 #define WINED3DUSAGE_QUERY_WRAPANDMIP 0x00200000L
1372 #define WINED3DUSAGE_QUERY_MASK 0x003F8000L
1374 typedef enum _WINED3DSURFTYPE {
1375 SURFACE_UNKNOWN = 0, /* Default / Unknown surface type */
1376 SURFACE_OPENGL, /* OpenGL surface: Renders using libGL, needed for 3D */
1377 SURFACE_GDI, /* User surface. No 3D, DirectDraw rendering with GDI */
1380 #define WINED3DCAPS2_NO2DDURING3DSCENE 0x00000002L
1381 #define WINED3DCAPS2_FULLSCREENGAMMA 0x00020000L
1382 #define WINED3DCAPS2_CANRENDERWINDOWED 0x00080000L
1383 #define WINED3DCAPS2_CANCALIBRATEGAMMA 0x00100000L
1384 #define WINED3DCAPS2_RESERVED 0x02000000L
1385 #define WINED3DCAPS2_CANMANAGERESOURCE 0x10000000L
1386 #define WINED3DCAPS2_DYNAMICTEXTURES 0x20000000L
1387 #define WINED3DCAPS2_CANAUTOGENMIPMAP 0x40000000L
1389 #define WINED3DPRASTERCAPS_DITHER 0x00000001L
1390 #define WINED3DPRASTERCAPS_ROP2 0x00000002L
1391 #define WINED3DPRASTERCAPS_XOR 0x00000004L
1392 #define WINED3DPRASTERCAPS_PAT 0x00000008L
1393 #define WINED3DPRASTERCAPS_ZTEST 0x00000010L
1394 #define WINED3DPRASTERCAPS_SUBPIXEL 0x00000020L
1395 #define WINED3DPRASTERCAPS_SUBPIXELX 0x00000040L
1396 #define WINED3DPRASTERCAPS_FOGVERTEX 0x00000080L
1397 #define WINED3DPRASTERCAPS_FOGTABLE 0x00000100L
1398 #define WINED3DPRASTERCAPS_STIPPLE 0x00000200L
1399 #define WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
1400 #define WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
1401 #define WINED3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
1402 #define WINED3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
1403 #define WINED3DPRASTERCAPS_ZBIAS 0x00004000L
1404 #define WINED3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
1405 #define WINED3DPRASTERCAPS_FOGRANGE 0x00010000L
1406 #define WINED3DPRASTERCAPS_ANISOTROPY 0x00020000L
1407 #define WINED3DPRASTERCAPS_WBUFFER 0x00040000L
1408 #define WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L
1409 #define WINED3DPRASTERCAPS_WFOG 0x00100000L
1410 #define WINED3DPRASTERCAPS_ZFOG 0x00200000L
1411 #define WINED3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L
1412 #define WINED3DPRASTERCAPS_SCISSORTEST 0x01000000L
1413 #define WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS 0x02000000L
1414 #define WINED3DPRASTERCAPS_DEPTHBIAS 0x04000000L
1415 #define WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE 0x08000000L
1417 #define WINED3DPSHADECAPS_COLORFLATMONO 0x000001
1418 #define WINED3DPSHADECAPS_COLORFLATRGB 0x000002
1419 #define WINED3DPSHADECAPS_COLORGOURAUDMONO 0x000004
1420 #define WINED3DPSHADECAPS_COLORGOURAUDRGB 0x000008
1421 #define WINED3DPSHADECAPS_COLORPHONGMONO 0x000010
1422 #define WINED3DPSHADECAPS_COLORPHONGRGB 0x000020
1423 #define WINED3DPSHADECAPS_SPECULARFLATMONO 0x000040
1424 #define WINED3DPSHADECAPS_SPECULARFLATRGB 0x000080
1425 #define WINED3DPSHADECAPS_SPECULARGOURAUDMONO 0x000100
1426 #define WINED3DPSHADECAPS_SPECULARGOURAUDRGB 0x000200
1427 #define WINED3DPSHADECAPS_SPECULARPHONGMONO 0x000400
1428 #define WINED3DPSHADECAPS_SPECULARPHONGRGB 0x000800
1429 #define WINED3DPSHADECAPS_ALPHAFLATBLEND 0x001000
1430 #define WINED3DPSHADECAPS_ALPHAFLATSTIPPLED 0x002000
1431 #define WINED3DPSHADECAPS_ALPHAGOURAUDBLEND 0x004000
1432 #define WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x008000
1433 #define WINED3DPSHADECAPS_ALPHAPHONGBLEND 0x010000
1434 #define WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x020000
1435 #define WINED3DPSHADECAPS_FOGFLAT 0x040000
1436 #define WINED3DPSHADECAPS_FOGGOURAUD 0x080000
1437 #define WINED3DPSHADECAPS_FOGPHONG 0x100000
1439 #define WINED3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
1440 #define WINED3DPTEXTURECAPS_POW2 0x00000002L
1441 #define WINED3DPTEXTURECAPS_ALPHA 0x00000004L
1442 #define WINED3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
1443 #define WINED3DPTEXTURECAPS_BORDER 0x00000010L
1444 #define WINED3DPTEXTURECAPS_SQUAREONLY 0x00000020L
1445 #define WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
1446 #define WINED3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L
1447 #define WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
1448 #define WINED3DPTEXTURECAPS_PROJECTED 0x00000400L
1449 #define WINED3DPTEXTURECAPS_CUBEMAP 0x00000800L
1450 #define WINED3DPTEXTURECAPS_COLORKEYBLEND 0x00001000L
1451 #define WINED3DPTEXTURECAPS_VOLUMEMAP 0x00002000L
1452 #define WINED3DPTEXTURECAPS_MIPMAP 0x00004000L
1453 #define WINED3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L
1454 #define WINED3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L
1455 #define WINED3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L
1456 #define WINED3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L
1457 #define WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV 0x00200000L
1459 #define WINED3DPTFILTERCAPS_NEAREST 0x00000001
1460 #define WINED3DPTFILTERCAPS_LINEAR 0x00000002
1461 #define WINED3DPTFILTERCAPS_MIPNEAREST 0x00000004
1462 #define WINED3DPTFILTERCAPS_MIPLINEAR 0x00000008
1463 #define WINED3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010
1464 #define WINED3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020
1465 #define WINED3DPTFILTERCAPS_MINFPOINT 0x00000100
1466 #define WINED3DPTFILTERCAPS_MINFLINEAR 0x00000200
1467 #define WINED3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400
1468 #define WINED3DPTFILTERCAPS_MIPFPOINT 0x00010000
1469 #define WINED3DPTFILTERCAPS_MIPFLINEAR 0x00020000
1470 #define WINED3DPTFILTERCAPS_MAGFPOINT 0x01000000
1471 #define WINED3DPTFILTERCAPS_MAGFLINEAR 0x02000000
1472 #define WINED3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000
1473 #define WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD 0x08000000
1474 #define WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD 0x10000000
1476 #define WINED3DVTXPCAPS_TEXGEN 0x00000001L
1477 #define WINED3DVTXPCAPS_MATERIALSOURCE7 0x00000002L
1478 #define WINED3DVTXPCAPS_VERTEXFOG 0x00000004L
1479 #define WINED3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L
1480 #define WINED3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L
1481 #define WINED3DVTXPCAPS_LOCALVIEWER 0x00000020L
1482 #define WINED3DVTXPCAPS_TWEENING 0x00000040L
1483 #define WINED3DVTXPCAPS_TEXGEN_SPHEREMAP 0x00000100L
1484 #define WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER 0x00000200L
1486 #define WINED3DCURSORCAPS_COLOR 0x000000001
1487 #define WINED3DCURSORCAPS_LOWRES 0x000000002
1489 #define WINED3DDEVCAPS_FLOATTLVERTEX 0x000000001
1490 #define WINED3DDEVCAPS_SORTINCREASINGZ 0x000000002
1491 #define WINED3DDEVCAPS_SORTDECREASINGZ 0X000000004
1492 #define WINED3DDEVCAPS_SORTEXACT 0x000000008
1493 #define WINED3DDEVCAPS_EXECUTESYSTEMMEMORY 0x000000010
1494 #define WINED3DDEVCAPS_EXECUTEVIDEOMEMORY 0x000000020
1495 #define WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x000000040
1496 #define WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x000000080
1497 #define WINED3DDEVCAPS_TEXTURESYSTEMMEMORY 0x000000100
1498 #define WINED3DDEVCAPS_TEXTUREVIDEOMEMORY 0x000000200
1499 #define WINED3DDEVCAPS_DRAWPRIMTLVERTEX 0x000000400
1500 #define WINED3DDEVCAPS_CANRENDERAFTERFLIP 0x000000800
1501 #define WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x000001000
1502 #define WINED3DDEVCAPS_DRAWPRIMITIVES2 0x000002000
1503 #define WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x000004000
1504 #define WINED3DDEVCAPS_DRAWPRIMITIVES2EX 0x000008000
1505 #define WINED3DDEVCAPS_HWTRANSFORMANDLIGHT 0x000010000
1506 #define WINED3DDEVCAPS_CANBLTSYSTONONLOCAL 0x000020000
1507 #define WINED3DDEVCAPS_HWRASTERIZATION 0x000080000
1508 #define WINED3DDEVCAPS_PUREDEVICE 0x000100000
1509 #define WINED3DDEVCAPS_QUINTICRTPATCHES 0x000200000
1510 #define WINED3DDEVCAPS_RTPATCHES 0x000400000
1511 #define WINED3DDEVCAPS_RTPATCHHANDLEZERO 0x000800000
1512 #define WINED3DDEVCAPS_NPATCHES 0x001000000
1514 #define WINED3DLOCK_READONLY 0x0010
1515 #define WINED3DLOCK_NOSYSLOCK 0x0800
1516 #define WINED3DLOCK_NOOVERWRITE 0x1000
1517 #define WINED3DLOCK_DISCARD 0x2000
1518 #define WINED3DLOCK_DONOTWAIT 0x4000
1519 #define WINED3DLOCK_NO_DIRTY_UPDATE 0x8000
1521 #define WINED3DPRESENT_RATE_DEFAULT 0x000000000
1523 #define WINED3DPRESENT_INTERVAL_DEFAULT 0x00000000
1524 #define WINED3DPRESENT_INTERVAL_ONE 0x00000001
1525 #define WINED3DPRESENT_INTERVAL_TWO 0x00000002
1526 #define WINED3DPRESENT_INTERVAL_THREE 0x00000004
1527 #define WINED3DPRESENT_INTERVAL_FOUR 0x00000008
1528 #define WINED3DPRESENT_INTERVAL_IMMEDIATE 0x80000000
1530 #define WINED3DMAXUSERCLIPPLANES 32
1531 #define WINED3DCLIPPLANE0 (1 << 0)
1532 #define WINED3DCLIPPLANE1 (1 << 1)
1533 #define WINED3DCLIPPLANE2 (1 << 2)
1534 #define WINED3DCLIPPLANE3 (1 << 3)
1535 #define WINED3DCLIPPLANE4 (1 << 4)
1536 #define WINED3DCLIPPLANE5 (1 << 5)
1538 /* FVF (Flexible Vertex Format) codes */
1539 #define WINED3DFVF_RESERVED0 0x0001
1540 #define WINED3DFVF_POSITION_MASK 0x000E
1541 #define WINED3DFVF_XYZ 0x0002
1542 #define WINED3DFVF_XYZRHW 0x0004
1543 #define WINED3DFVF_XYZB1 0x0006
1544 #define WINED3DFVF_XYZB2 0x0008
1545 #define WINED3DFVF_XYZB3 0x000a
1546 #define WINED3DFVF_XYZB4 0x000c
1547 #define WINED3DFVF_XYZB5 0x000e
1548 #define WINED3DFVF_XYZW 0x4002
1549 #define WINED3DFVF_NORMAL 0x0010
1550 #define WINED3DFVF_PSIZE 0x0020
1551 #define WINED3DFVF_DIFFUSE 0x0040
1552 #define WINED3DFVF_SPECULAR 0x0080
1553 #define WINED3DFVF_TEXCOUNT_MASK 0x0f00
1554 #define WINED3DFVF_TEXCOUNT_SHIFT 8
1555 #define WINED3DFVF_TEX0 0x0000
1556 #define WINED3DFVF_TEX1 0x0100
1557 #define WINED3DFVF_TEX2 0x0200
1558 #define WINED3DFVF_TEX3 0x0300
1559 #define WINED3DFVF_TEX4 0x0400
1560 #define WINED3DFVF_TEX5 0x0500
1561 #define WINED3DFVF_TEX6 0x0600
1562 #define WINED3DFVF_TEX7 0x0700
1563 #define WINED3DFVF_TEX8 0x0800
1564 #define WINED3DFVF_LASTBETA_UBYTE4 0x1000
1565 #define WINED3DFVF_LASTBETA_D3DCOLOR 0x8000
1566 #define WINED3DFVF_RESERVED2 0x6000
1568 #define WINED3DFVF_TEXTUREFORMAT1 3
1569 #define WINED3DFVF_TEXTUREFORMAT2 0
1570 #define WINED3DFVF_TEXTUREFORMAT3 1
1571 #define WINED3DFVF_TEXTUREFORMAT4 2
1572 #define WINED3DFVF_TEXCOORDSIZE1(CoordIndex) (WINED3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
1573 #define WINED3DFVF_TEXCOORDSIZE2(CoordIndex) (WINED3DFVF_TEXTUREFORMAT2)
1574 #define WINED3DFVF_TEXCOORDSIZE3(CoordIndex) (WINED3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
1575 #define WINED3DFVF_TEXCOORDSIZE4(CoordIndex) (WINED3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
1578 #define WINED3DCLEAR_TARGET 0x00000001
1579 #define WINED3DCLEAR_ZBUFFER 0x00000002
1580 #define WINED3DCLEAR_STENCIL 0x00000004
1582 /* Stream source flags */
1583 #define WINED3DSTREAMSOURCE_INDEXEDDATA (1 << 30)
1584 #define WINED3DSTREAMSOURCE_INSTANCEDATA (2 << 30)
1586 /* SetPrivateData flags */
1587 #define WINED3DSPD_IUNKNOWN 0x00000001
1589 /* IWineD3D::CreateDevice behaviour flags */
1590 #define WINED3DCREATE_FPU_PRESERVE 0x00000002
1591 #define WINED3DCREATE_PUREDEVICE 0x00000010
1592 #define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020
1593 #define WINED3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040
1594 #define WINED3DCREATE_MIXED_VERTEXPROCESSING 0x00000080
1595 #define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT 0x00000100
1596 #define WINED3DCREATE_ADAPTERGROUP_DEVICE 0x00000200
1599 #define WINED3DDMAPSAMPLER 0x100
1600 #define WINED3DVERTEXTEXTURESAMPLER0 (WINED3DDMAPSAMPLER + 1)
1601 #define WINED3DVERTEXTEXTURESAMPLER1 (WINED3DDMAPSAMPLER + 2)
1602 #define WINED3DVERTEXTEXTURESAMPLER2 (WINED3DDMAPSAMPLER + 3)
1603 #define WINED3DVERTEXTEXTURESAMPLER3 (WINED3DDMAPSAMPLER + 4)
1605 /* DirectDraw types */
1607 typedef struct _WINEDDCOLORKEY
1609 DWORD dwColorSpaceLowValue; /* low boundary of color space that is to
1610 * be treated as Color Key, inclusive
1612 DWORD dwColorSpaceHighValue; /* high boundary of color space that is
1613 * to be treated as Color Key, inclusive
1615 } WINEDDCOLORKEY,*LPWINEDDCOLORKEY;
1617 typedef struct _WINEDDBLTFX
1619 DWORD dwSize; /* size of structure */
1620 DWORD dwDDFX; /* FX operations */
1621 DWORD dwROP; /* Win32 raster operations */
1622 DWORD dwDDROP; /* Raster operations new for DirectDraw */
1623 DWORD dwRotationAngle; /* Rotation angle for blt */
1624 DWORD dwZBufferOpCode; /* ZBuffer compares */
1625 DWORD dwZBufferLow; /* Low limit of Z buffer */
1626 DWORD dwZBufferHigh; /* High limit of Z buffer */
1627 DWORD dwZBufferBaseDest; /* Destination base value */
1628 DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */
1631 DWORD dwZDestConst; /* Constant to use as Z buffer for dest */
1632 struct IWineD3DSurface *lpDDSZBufferDest; /* Surface to use as Z buffer for dest */
1634 DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */
1637 DWORD dwZSrcConst; /* Constant to use as Z buffer for src */
1638 struct IWineD3DSurface *lpDDSZBufferSrc;/* Surface to use as Z buffer for src */
1640 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1641 DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */
1643 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1646 DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */
1647 struct IWineD3DSurface *lpDDSAlphaDest; /* Surface to use as Alpha Channel */
1649 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1652 DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */
1653 struct IWineD3DSurface *lpDDSAlphaSrc; /* Surface to use as Alpha Channel */
1657 DWORD dwFillColor; /* color in RGB or Palettized */
1658 DWORD dwFillDepth; /* depth value for z-buffer */
1659 DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */
1660 struct IWineD3DSurface *lpDDSPattern; /* Surface to use as pattern */
1662 WINEDDCOLORKEY ddckDestColorkey; /* DestColorkey override */
1663 WINEDDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */
1664 } WINEDDBLTFX,*LPWINEDDBLTFX;
1666 typedef struct _WINEDDOVERLAYFX
1668 DWORD dwSize; /* size of structure */
1669 DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */
1670 DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */
1672 DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */
1675 DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */
1676 struct IWineD3DSurface *lpDDSAlphaDest; /* Surface to use as alpha channel for dest */
1678 DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */
1681 DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */
1682 struct IWineD3DSurface *lpDDSAlphaSrc; /* Surface to use as alpha channel for src */
1684 WINEDDCOLORKEY dckDestColorkey; /* DestColorkey override */
1685 WINEDDCOLORKEY dckSrcColorkey; /* DestColorkey override */
1686 DWORD dwDDFX; /* Overlay FX */
1687 DWORD dwFlags; /* flags */
1691 /* arithmetic stretching along y axis */
1692 #define WINEDDBLTFX_ARITHSTRETCHY 0x00000001
1693 /* mirror on y axis */
1694 #define WINEDDBLTFX_MIRRORLEFTRIGHT 0x00000002
1695 /* mirror on x axis */
1696 #define WINEDDBLTFX_MIRRORUPDOWN 0x00000004
1698 #define WINEDDBLTFX_NOTEARING 0x00000008
1699 /* 180 degrees clockwise rotation */
1700 #define WINEDDBLTFX_ROTATE180 0x00000010
1701 /* 270 degrees clockwise rotation */
1702 #define WINEDDBLTFX_ROTATE270 0x00000020
1703 /* 90 degrees clockwise rotation */
1704 #define WINEDDBLTFX_ROTATE90 0x00000040
1705 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */
1706 #define WINEDDBLTFX_ZBUFFERRANGE 0x00000080
1707 /* add dwZBufferBaseDest to every source z value before compare */
1708 #define WINEDDBLTFX_ZBUFFERBASEDEST 0x00000100
1710 /* dwFlags for Blt* */
1711 #define WINEDDBLT_ALPHADEST 0x00000001
1712 #define WINEDDBLT_ALPHADESTCONSTOVERRIDE 0x00000002
1713 #define WINEDDBLT_ALPHADESTNEG 0x00000004
1714 #define WINEDDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008
1715 #define WINEDDBLT_ALPHAEDGEBLEND 0x00000010
1716 #define WINEDDBLT_ALPHASRC 0x00000020
1717 #define WINEDDBLT_ALPHASRCCONSTOVERRIDE 0x00000040
1718 #define WINEDDBLT_ALPHASRCNEG 0x00000080
1719 #define WINEDDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100
1720 #define WINEDDBLT_ASYNC 0x00000200
1721 #define WINEDDBLT_COLORFILL 0x00000400
1722 #define WINEDDBLT_DDFX 0x00000800
1723 #define WINEDDBLT_DDROPS 0x00001000
1724 #define WINEDDBLT_KEYDEST 0x00002000
1725 #define WINEDDBLT_KEYDESTOVERRIDE 0x00004000
1726 #define WINEDDBLT_KEYSRC 0x00008000
1727 #define WINEDDBLT_KEYSRCOVERRIDE 0x00010000
1728 #define WINEDDBLT_ROP 0x00020000
1729 #define WINEDDBLT_ROTATIONANGLE 0x00040000
1730 #define WINEDDBLT_ZBUFFER 0x00080000
1731 #define WINEDDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000
1732 #define WINEDDBLT_ZBUFFERDESTOVERRIDE 0x00200000
1733 #define WINEDDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000
1734 #define WINEDDBLT_ZBUFFERSRCOVERRIDE 0x00800000
1735 #define WINEDDBLT_WAIT 0x01000000
1736 #define WINEDDBLT_DEPTHFILL 0x02000000
1737 #define WINEDDBLT_DONOTWAIT 0x08000000
1739 /* dwTrans for BltFast */
1740 #define WINEDDBLTFAST_NOCOLORKEY 0x00000000
1741 #define WINEDDBLTFAST_SRCCOLORKEY 0x00000001
1742 #define WINEDDBLTFAST_DESTCOLORKEY 0x00000002
1743 #define WINEDDBLTFAST_WAIT 0x00000010
1744 #define WINEDDBLTFAST_DONOTWAIT 0x00000020
1746 /* DDCAPS.dwPalCaps */
1747 #define WINEDDPCAPS_4BIT 0x00000001
1748 #define WINEDDPCAPS_8BITENTRIES 0x00000002
1749 #define WINEDDPCAPS_8BIT 0x00000004
1750 #define WINEDDPCAPS_INITIALIZE 0x00000008
1751 #define WINEDDPCAPS_PRIMARYSURFACE 0x00000010
1752 #define WINEDDPCAPS_PRIMARYSURFACELEFT 0x00000020
1753 #define WINEDDPCAPS_ALLOW256 0x00000040
1754 #define WINEDDPCAPS_VSYNC 0x00000080
1755 #define WINEDDPCAPS_1BIT 0x00000100
1756 #define WINEDDPCAPS_2BIT 0x00000200
1757 #define WINEDDPCAPS_ALPHA 0x00000400
1759 /* DDSURFACEDESC.dwFlags */
1760 #define WINEDDSD_CAPS 0x00000001
1761 #define WINEDDSD_HEIGHT 0x00000002
1762 #define WINEDDSD_WIDTH 0x00000004
1763 #define WINEDDSD_PITCH 0x00000008
1764 #define WINEDDSD_BACKBUFFERCOUNT 0x00000020
1765 #define WINEDDSD_ZBUFFERBITDEPTH 0x00000040
1766 #define WINEDDSD_ALPHABITDEPTH 0x00000080
1767 #define WINEDDSD_LPSURFACE 0x00000800
1768 #define WINEDDSD_PIXELFORMAT 0x00001000
1769 #define WINEDDSD_CKDESTOVERLAY 0x00002000
1770 #define WINEDDSD_CKDESTBLT 0x00004000
1771 #define WINEDDSD_CKSRCOVERLAY 0x00008000
1772 #define WINEDDSD_CKSRCBLT 0x00010000
1773 #define WINEDDSD_MIPMAPCOUNT 0x00020000
1774 #define WINEDDSD_REFRESHRATE 0x00040000
1775 #define WINEDDSD_LINEARSIZE 0x00080000
1776 #define WINEDDSD_TEXTURESTAGE 0x00100000
1777 #define WINEDDSD_FVF 0x00200000
1778 #define WINEDDSD_SRCVBHANDLE 0x00400000
1779 #define WINEDDSD_ALL 0x007ff9ee
1781 /* Set/Get Colour Key Flags */
1782 #define WINEDDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */
1783 #define WINEDDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */
1784 #define WINEDDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */
1785 #define WINEDDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */
1786 #define WINEDDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */
1788 /* dwFlags for GetBltStatus */
1789 #define WINEDDGBS_CANBLT 0x00000001
1790 #define WINEDDGBS_ISBLTDONE 0x00000002
1792 /* dwFlags for GetFlipStatus */
1793 #define WINEDDGFS_CANFLIP 1L
1794 #define WINEDDGFS_ISFLIPDONE 2L
1796 /* dwFlags for Flip */
1797 #define WINEDDFLIP_WAIT 0x00000001
1798 #define WINEDDFLIP_EVEN 0x00000002 /* only valid for overlay */
1799 #define WINEDDFLIP_ODD 0x00000004 /* only valid for overlay */
1800 #define WINEDDFLIP_NOVSYNC 0x00000008
1801 #define WINEDDFLIP_STEREO 0x00000010
1802 #define WINEDDFLIP_DONOTWAIT 0x00000020
1803 #define WINEDDFLIP_INTERVAL2 0x02000000
1804 #define WINEDDFLIP_INTERVAL3 0x03000000
1805 #define WINEDDFLIP_INTERVAL4 0x04000000
1807 #define WINEDDOVER_ALPHADEST 0x00000001
1808 #define WINEDDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
1809 #define WINEDDOVER_ALPHADESTNEG 0x00000004
1810 #define WINEDDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
1811 #define WINEDDOVER_ALPHAEDGEBLEND 0x00000010
1812 #define WINEDDOVER_ALPHASRC 0x00000020
1813 #define WINEDDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
1814 #define WINEDDOVER_ALPHASRCNEG 0x00000080
1815 #define WINEDDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
1816 #define WINEDDOVER_HIDE 0x00000200
1817 #define WINEDDOVER_KEYDEST 0x00000400
1818 #define WINEDDOVER_KEYDESTOVERRIDE 0x00000800
1819 #define WINEDDOVER_KEYSRC 0x00001000
1820 #define WINEDDOVER_KEYSRCOVERRIDE 0x00002000
1821 #define WINEDDOVER_SHOW 0x00004000
1822 #define WINEDDOVER_ADDDIRTYRECT 0x00008000
1823 #define WINEDDOVER_REFRESHDIRTYRECTS 0x00010000
1824 #define WINEDDOVER_REFRESHALL 0x00020000
1825 #define WINEDDOVER_DDFX 0x00080000
1826 #define WINEDDOVER_AUTOFLIP 0x00100000
1827 #define WINEDDOVER_BOB 0x00200000
1828 #define WINEDDOVER_OVERRIDEBOBWEAVE 0x00400000
1829 #define WINEDDOVER_INTERLEAVED 0x00800000