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