server: Compute the removable device flag on the server side.
[wine] / include / wine / wined3d_types.h
1 /*
2  * Direct3D wine types include file
3  *
4  * Copyright 2002-2003 The wine-d3d team
5  * Copyright 2002-2003 Jason Edmeades
6  *                     Raphael Junqueira
7  * Copyright 2005 Oliver Stieber
8  * Copyright 2006 Stefan Dösinger
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24
25 #ifndef __WINE_WINED3D_TYPES_H
26 #define __WINE_WINED3D_TYPES_H
27
28 typedef DWORD WINED3DCOLOR;
29
30 typedef enum _WINED3DLIGHTTYPE {
31   WINED3DLIGHT_POINT          = 1,
32   WINED3DLIGHT_SPOT           = 2,
33   WINED3DLIGHT_DIRECTIONAL    = 3,
34   WINED3DLIGHT_PARALLELPOINT  = 4, /* D3D7 */
35   WINED3DLIGHT_GLSPOT         = 5, /* D3D7 */
36   WINED3DLIGHT_FORCE_DWORD    = 0x7fffffff
37 } WINED3DLIGHTTYPE;
38
39 typedef enum _WINED3DPRIMITIVETYPE {
40     WINED3DPT_POINTLIST       = 1,
41     WINED3DPT_LINELIST        = 2,
42     WINED3DPT_LINESTRIP       = 3,
43     WINED3DPT_TRIANGLELIST    = 4,
44     WINED3DPT_TRIANGLESTRIP   = 5,
45     WINED3DPT_TRIANGLEFAN     = 6,
46
47     WINED3DPT_FORCE_DWORD     = 0x7fffffff
48 } WINED3DPRIMITIVETYPE;
49
50 typedef struct _WINED3DCOLORVALUE {
51     float r;
52     float g;
53     float b;
54     float a;
55 } WINED3DCOLORVALUE;
56
57 typedef struct _WINED3DVECTOR {
58     float x;
59     float y;
60     float z;
61 } WINED3DVECTOR;
62
63 typedef struct _WINED3DMATRIX {
64     union {
65         struct {
66             float        _11, _12, _13, _14;
67             float        _21, _22, _23, _24;
68             float        _31, _32, _33, _34;
69             float        _41, _42, _43, _44;
70         } DUMMYSTRUCTNAME;
71         float m[4][4];
72     } DUMMYUNIONNAME;
73 } WINED3DMATRIX;
74
75 typedef struct _WINED3DRECT {
76     LONG x1;
77     LONG y1;
78     LONG x2;
79     LONG y2;
80 } WINED3DRECT;
81
82 typedef struct _WINED3DLIGHT {
83     WINED3DLIGHTTYPE    Type;
84     WINED3DCOLORVALUE   Diffuse;
85     WINED3DCOLORVALUE   Specular;
86     WINED3DCOLORVALUE   Ambient;
87     WINED3DVECTOR       Position;
88     WINED3DVECTOR       Direction;
89     float               Range;
90     float               Falloff;
91     float               Attenuation0;
92     float               Attenuation1;
93     float               Attenuation2;
94     float               Theta;
95     float               Phi;
96 } WINED3DLIGHT;
97
98 typedef struct _WINED3DMATERIAL {
99     WINED3DCOLORVALUE   Diffuse;
100     WINED3DCOLORVALUE   Ambient;
101     WINED3DCOLORVALUE   Specular;
102     WINED3DCOLORVALUE   Emissive;
103     float           Power;
104 } WINED3DMATERIAL;
105
106 typedef struct _WINED3DVIEWPORT {
107     DWORD       X;
108     DWORD       Y;
109     DWORD       Width;
110     DWORD       Height;
111     float       MinZ;
112     float       MaxZ;
113 } WINED3DVIEWPORT;
114
115 typedef struct _WINED3DGAMMARAMP {
116     WORD                red  [256];
117     WORD                green[256];
118     WORD                blue [256];
119 } WINED3DGAMMARAMP;
120
121 typedef struct _WINED3DLINEPATTERN {
122     WORD    wRepeatFactor;
123     WORD    wLinePattern;
124 } WINED3DLINEPATTERN;
125
126 #define WINED3D_VSHADER_MAX_CONSTANTS 96
127 #define WINED3D_PSHADER_MAX_CONSTANTS 32
128
129 typedef struct _WINED3DVECTOR_3 {
130     float x;
131     float y;
132     float z;
133 } WINED3DVECTOR_3;
134
135 typedef struct _WINED3DVECTOR_4 {
136     float x;
137     float y;
138     float z;
139     float w;
140 } WINED3DVECTOR_4;
141
142 typedef struct WINED3DSHADERVECTOR {
143   float x;
144   float y;
145   float z;
146   float w;
147 } WINED3DSHADERVECTOR;
148
149 typedef struct WINED3DSHADERSCALAR {
150   float x;
151 } WINED3DSHADERSCALAR;
152
153 typedef WINED3DSHADERVECTOR WINEVSHADERCONSTANTS8[WINED3D_VSHADER_MAX_CONSTANTS];
154
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;
163
164 /** temporary here waiting for buffer code */
165 typedef struct VSHADERINPUTDATA {
166   WINED3DSHADERVECTOR V[17];
167 } WINEVSHADERINPUTDATA;
168
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;
177
178 typedef WINED3DSHADERVECTOR WINEPSHADERCONSTANTS8[WINED3D_PSHADER_MAX_CONSTANTS];
179
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;
188
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;
196
197 /** temporary here waiting for buffer code */
198 typedef struct PSHADEROUTPUTDATA {
199   WINED3DSHADERVECTOR oC[4];
200   WINED3DSHADERVECTOR oDepth;
201 } WINEPSHADEROUTPUTDATA;
202
203 /*****************************************************************************
204  * WineD3D Structures to be used when d3d8 and d3d9 are incompatible
205  */
206
207
208 typedef enum _WINED3DDEVTYPE {
209     WINED3DDEVTYPE_HAL         = 1,
210     WINED3DDEVTYPE_REF         = 2,
211     WINED3DDEVTYPE_SW          = 3,
212     WINED3DDEVTYPE_NULLREF     = 4,
213
214     WINED3DDEVTYPE_FORCE_DWORD = 0xffffffff
215 } WINED3DDEVTYPE;
216
217 typedef enum _WINED3DDEGREETYPE {
218     WINED3DDEGREE_LINEAR      = 1,
219     WINED3DDEGREE_QUADRATIC   = 2,
220     WINED3DDEGREE_CUBIC       = 3,
221     WINED3DDEGREE_QUINTIC     = 5,
222     
223     WINED3DDEGREE_FORCE_DWORD   = 0x7fffffff
224 } WINED3DDEGREETYPE;
225
226 typedef enum _WINED3DFORMAT {
227     WINED3DFMT_UNKNOWN              =   0,
228
229     WINED3DFMT_R8G8B8               =  20,
230     WINED3DFMT_A8R8G8B8             =  21,
231     WINED3DFMT_X8R8G8B8             =  22,
232     WINED3DFMT_R5G6B5               =  23,
233     WINED3DFMT_X1R5G5B5             =  24,
234     WINED3DFMT_A1R5G5B5             =  25,
235     WINED3DFMT_A4R4G4B4             =  26,
236     WINED3DFMT_R3G3B2               =  27,
237     WINED3DFMT_A8                   =  28,
238     WINED3DFMT_A8R3G3B2             =  29,
239     WINED3DFMT_X4R4G4B4             =  30,
240     WINED3DFMT_A2B10G10R10          =  31,
241     WINED3DFMT_A8B8G8R8             =  32,
242     WINED3DFMT_X8B8G8R8             =  33,
243     WINED3DFMT_G16R16               =  34,
244     WINED3DFMT_A2R10G10B10          =  35,
245     WINED3DFMT_A16B16G16R16         =  36,
246   
247
248     WINED3DFMT_A8P8                 =  40,
249     WINED3DFMT_P8                   =  41,
250
251     WINED3DFMT_L8                   =  50,
252     WINED3DFMT_A8L8                 =  51,
253     WINED3DFMT_A4L4                 =  52,
254
255     WINED3DFMT_V8U8                 =  60,
256     WINED3DFMT_L6V5U5               =  61,
257     WINED3DFMT_X8L8V8U8             =  62,
258     WINED3DFMT_Q8W8V8U8             =  63,
259     WINED3DFMT_V16U16               =  64,
260     WINED3DFMT_W11V11U10            =  65,
261     WINED3DFMT_A2W10V10U10          =  67,
262
263     WINED3DFMT_UYVY                 =  MAKEFOURCC('U', 'Y', 'V', 'Y'),
264     WINED3DFMT_YUY2                 =  MAKEFOURCC('Y', 'U', 'Y', '2'),
265     WINED3DFMT_DXT1                 =  MAKEFOURCC('D', 'X', 'T', '1'),
266     WINED3DFMT_DXT2                 =  MAKEFOURCC('D', 'X', 'T', '2'),
267     WINED3DFMT_DXT3                 =  MAKEFOURCC('D', 'X', 'T', '3'),
268     WINED3DFMT_DXT4                 =  MAKEFOURCC('D', 'X', 'T', '4'),
269     WINED3DFMT_DXT5                 =  MAKEFOURCC('D', 'X', 'T', '5'),
270     WINED3DFMT_MULTI2_ARGB          =  MAKEFOURCC('M', 'E', 'T', '1'),
271     WINED3DFMT_G8R8_G8B8            =  MAKEFOURCC('G', 'R', 'G', 'B'),
272     WINED3DFMT_R8G8_B8G8            =  MAKEFOURCC('R', 'G', 'B', 'G'),
273
274     WINED3DFMT_D16_LOCKABLE         =  70,
275     WINED3DFMT_D32                  =  71,
276     WINED3DFMT_D15S1                =  73,
277     WINED3DFMT_D24S8                =  75,
278     WINED3DFMT_D24X8                =  77,
279     WINED3DFMT_D24X4S4              =  79,
280     WINED3DFMT_D16                  =  80,
281     WINED3DFMT_L16                  =  81,
282     WINED3DFMT_D32F_LOCKABLE        =  82,
283     WINED3DFMT_D24FS8               =  83,
284
285     WINED3DFMT_VERTEXDATA           = 100,
286     WINED3DFMT_INDEX16              = 101,
287     WINED3DFMT_INDEX32              = 102,
288     WINED3DFMT_Q16W16V16U16         = 110,
289     /* Flaoting point formats */
290     WINED3DFMT_R16F                 = 111,
291     WINED3DFMT_G16R16F              = 112,
292     WINED3DFMT_A16B16G16R16F        = 113,
293     
294     /* IEEE formats */
295     WINED3DFMT_R32F                 = 114,
296     WINED3DFMT_G32R32F              = 115,
297     WINED3DFMT_A32B32G32R32F        = 116,
298     
299     WINED3DFMT_CxV8U8               = 117,
300
301
302     WINED3DFMT_FORCE_DWORD          = 0xFFFFFFFF
303 } WINED3DFORMAT;
304
305 typedef enum _WINED3DRENDERSTATETYPE {
306     WINED3DRS_TEXTUREHANDLE             =   1, /* d3d7 */
307     WINED3DRS_ANTIALIAS                 =   2, /* d3d7 */
308     WINED3DRS_TEXTUREADDRESS            =   3, /* d3d7 */
309     WINED3DRS_TEXTUREPERSPECTIVE        =   4, /* d3d7 */
310     WINED3DRS_WRAPU                     =   5, /* d3d7 */
311     WINED3DRS_WRAPV                     =   6, /* d3d7 */
312     WINED3DRS_ZENABLE                   =   7,
313     WINED3DRS_FILLMODE                  =   8,
314     WINED3DRS_SHADEMODE                 =   9,
315     WINED3DRS_LINEPATTERN               =  10, /* d3d7, d3d8 */
316     WINED3DRS_MONOENABLE                =  11, /* d3d7 */
317     WINED3DRS_ROP2                      =  12, /* d3d7 */
318     WINED3DRS_PLANEMASK                 =  13, /* d3d7 */
319     WINED3DRS_ZWRITEENABLE              =  14,
320     WINED3DRS_ALPHATESTENABLE           =  15,
321     WINED3DRS_LASTPIXEL                 =  16,
322     WINED3DRS_TEXTUREMAG                =  17, /* d3d7 */
323     WINED3DRS_TEXTUREMIN                =  18, /* d3d7 */
324     WINED3DRS_SRCBLEND                  =  19,
325     WINED3DRS_DESTBLEND                 =  20,
326     WINED3DRS_TEXTUREMAPBLEND           =  21, /* d3d7 */
327     WINED3DRS_CULLMODE                  =  22,
328     WINED3DRS_ZFUNC                     =  23,
329     WINED3DRS_ALPHAREF                  =  24,
330     WINED3DRS_ALPHAFUNC                 =  25,
331     WINED3DRS_DITHERENABLE              =  26,
332     WINED3DRS_ALPHABLENDENABLE          =  27,
333     WINED3DRS_FOGENABLE                 =  28,
334     WINED3DRS_SPECULARENABLE            =  29,
335     WINED3DRS_ZVISIBLE                  =  30, /* d3d7, d3d8 */
336     WINED3DRS_SUBPIXEL                  =  31, /* d3d7 */
337     WINED3DRS_SUBPIXELX                 =  32, /* d3d7 */
338     WINED3DRS_STIPPLEDALPHA             =  33, /* d3d7 */
339     WINED3DRS_FOGCOLOR                  =  34,
340     WINED3DRS_FOGTABLEMODE              =  35,
341     WINED3DRS_FOGSTART                  =  36,
342     WINED3DRS_FOGEND                    =  37,
343     WINED3DRS_FOGDENSITY                =  38,
344     WINED3DRS_STIPPLEENABLE             =  39, /* d3d7 */
345     WINED3DRS_EDGEANTIALIAS             =  40, /* d3d7, d3d8 */
346     WINED3DRS_COLORKEYENABLE            =  41, /* d3d7 */
347     WINED3DRS_BORDERCOLOR               =  43, /* d3d7 */
348     WINED3DRS_TEXTUREADDRESSU           =  44, /* d3d7 */
349     WINED3DRS_TEXTUREADDRESSV           =  45, /* d3d7 */
350     WINED3DRS_MIPMAPLODBIAS             =  46, /* d3d7 */
351     WINED3DRS_ZBIAS                     =  47, /* d3d7, d3d8 */
352     WINED3DRS_RANGEFOGENABLE            =  48,
353     WINED3DRS_ANISOTROPY                =  49, /* d3d7 */
354     WINED3DRS_FLUSHBATCH                =  50, /* d3d7 */
355     WINED3DRS_TRANSLUCENTSORTINDEPENDENT = 51, /* d3d7 */
356     WINED3DRS_STENCILENABLE             =  52,
357     WINED3DRS_STENCILFAIL               =  53,
358     WINED3DRS_STENCILZFAIL              =  54,
359     WINED3DRS_STENCILPASS               =  55,
360     WINED3DRS_STENCILFUNC               =  56,
361     WINED3DRS_STENCILREF                =  57,
362     WINED3DRS_STENCILMASK               =  58,
363     WINED3DRS_STENCILWRITEMASK          =  59,
364     WINED3DRS_TEXTUREFACTOR             =  60,
365     WINED3DRS_WRAP0                     = 128,
366     WINED3DRS_WRAP1                     = 129,
367     WINED3DRS_WRAP2                     = 130,
368     WINED3DRS_WRAP3                     = 131,
369     WINED3DRS_WRAP4                     = 132,
370     WINED3DRS_WRAP5                     = 133,
371     WINED3DRS_WRAP6                     = 134,
372     WINED3DRS_WRAP7                     = 135,
373     WINED3DRS_CLIPPING                  = 136,
374     WINED3DRS_LIGHTING                  = 137,
375     WINED3DRS_EXTENTS                   = 138, /* d3d7 */
376     WINED3DRS_AMBIENT                   = 139,
377     WINED3DRS_FOGVERTEXMODE             = 140,
378     WINED3DRS_COLORVERTEX               = 141,
379     WINED3DRS_LOCALVIEWER               = 142,
380     WINED3DRS_NORMALIZENORMALS          = 143,
381     WINED3DRS_COLORKEYBLENDENABLE       = 144, /* d3d7 */
382     WINED3DRS_DIFFUSEMATERIALSOURCE     = 145,
383     WINED3DRS_SPECULARMATERIALSOURCE    = 146,
384     WINED3DRS_AMBIENTMATERIALSOURCE     = 147,
385     WINED3DRS_EMISSIVEMATERIALSOURCE    = 148,
386     WINED3DRS_VERTEXBLEND               = 151,
387     WINED3DRS_CLIPPLANEENABLE           = 152,  
388     WINED3DRS_SOFTWAREVERTEXPROCESSING  = 153, /* d3d8 */
389     WINED3DRS_POINTSIZE                 = 154,
390     WINED3DRS_POINTSIZE_MIN             = 155,
391     WINED3DRS_POINTSPRITEENABLE         = 156,
392     WINED3DRS_POINTSCALEENABLE          = 157,
393     WINED3DRS_POINTSCALE_A              = 158,
394     WINED3DRS_POINTSCALE_B              = 159,
395     WINED3DRS_POINTSCALE_C              = 160,
396     WINED3DRS_MULTISAMPLEANTIALIAS      = 161,
397     WINED3DRS_MULTISAMPLEMASK           = 162,
398     WINED3DRS_PATCHEDGESTYLE            = 163,
399     WINED3DRS_PATCHSEGMENTS             = 164, /* d3d8 */
400     WINED3DRS_DEBUGMONITORTOKEN         = 165,
401     WINED3DRS_POINTSIZE_MAX             = 166,
402     WINED3DRS_INDEXEDVERTEXBLENDENABLE  = 167,
403     WINED3DRS_COLORWRITEENABLE          = 168,
404     WINED3DRS_TWEENFACTOR               = 170,
405     WINED3DRS_BLENDOP                   = 171,
406     WINED3DRS_POSITIONORDER             = 172,
407     WINED3DRS_NORMALORDER               = 173,
408     WINED3DRS_POSITIONDEGREE            = 172,
409     WINED3DRS_NORMALDEGREE              = 173,
410     WINED3DRS_SCISSORTESTENABLE         = 174,
411     WINED3DRS_SLOPESCALEDEPTHBIAS       = 175,
412     WINED3DRS_ANTIALIASEDLINEENABLE     = 176,
413     WINED3DRS_MINTESSELLATIONLEVEL      = 178,
414     WINED3DRS_MAXTESSELLATIONLEVEL      = 179,
415     WINED3DRS_ADAPTIVETESS_X            = 180,
416     WINED3DRS_ADAPTIVETESS_Y            = 181,
417     WINED3DRS_ADAPTIVETESS_Z            = 182,
418     WINED3DRS_ADAPTIVETESS_W            = 183,
419     WINED3DRS_ENABLEADAPTIVETESSELLATION= 184,
420     WINED3DRS_TWOSIDEDSTENCILMODE       = 185,
421     WINED3DRS_CCW_STENCILFAIL           = 186,
422     WINED3DRS_CCW_STENCILZFAIL          = 187,
423     WINED3DRS_CCW_STENCILPASS           = 188,
424     WINED3DRS_CCW_STENCILFUNC           = 189,
425     WINED3DRS_COLORWRITEENABLE1         = 190,
426     WINED3DRS_COLORWRITEENABLE2         = 191,
427     WINED3DRS_COLORWRITEENABLE3         = 192,
428     WINED3DRS_BLENDFACTOR               = 193,
429     WINED3DRS_SRGBWRITEENABLE           = 194,
430     WINED3DRS_DEPTHBIAS                 = 195,
431     WINED3DRS_WRAP8                     = 198,
432     WINED3DRS_WRAP9                     = 199,
433     WINED3DRS_WRAP10                    = 200,
434     WINED3DRS_WRAP11                    = 201,
435     WINED3DRS_WRAP12                    = 202,
436     WINED3DRS_WRAP13                    = 203,
437     WINED3DRS_WRAP14                    = 204,
438     WINED3DRS_WRAP15                    = 205,
439     WINED3DRS_SEPARATEALPHABLENDENABLE  = 206,
440     WINED3DRS_SRCBLENDALPHA             = 207,
441     WINED3DRS_DESTBLENDALPHA            = 208,
442     WINED3DRS_BLENDOPALPHA              = 209,
443
444     WINED3DRS_FORCE_DWORD               = 0x7fffffff
445 } WINED3DRENDERSTATETYPE;
446
447 #define WINEHIGHEST_RENDER_STATE   WINED3DRS_BLENDOPALPHA
448         /* Highest WINED3DRS_ value   */
449
450 #define WINED3DCOLORWRITEENABLE_RED   (1<<0)
451 #define WINED3DCOLORWRITEENABLE_GREEN (1<<1)
452 #define WINED3DCOLORWRITEENABLE_BLUE  (1<<2)
453 #define WINED3DCOLORWRITEENABLE_ALPHA (1<<3)
454
455 typedef enum _WINED3DBLEND {
456     WINED3DBLEND_ZERO               =  1,
457     WINED3DBLEND_ONE                =  2,
458     WINED3DBLEND_SRCCOLOR           =  3,
459     WINED3DBLEND_INVSRCCOLOR        =  4,
460     WINED3DBLEND_SRCALPHA           =  5,
461     WINED3DBLEND_INVSRCALPHA        =  6,
462     WINED3DBLEND_DESTALPHA          =  7,
463     WINED3DBLEND_INVDESTALPHA       =  8,
464     WINED3DBLEND_DESTCOLOR          =  9,
465     WINED3DBLEND_INVDESTCOLOR       = 10,
466     WINED3DBLEND_SRCALPHASAT        = 11,
467     WINED3DBLEND_BOTHSRCALPHA       = 12,
468     WINED3DBLEND_BOTHINVSRCALPHA    = 13,
469     WINED3DBLEND_BLENDFACTOR        = 14,
470     WINED3DBLEND_INVBLENDFACTOR     = 15,
471     WINED3DBLEND_FORCE_DWORD        = 0x7fffffff
472 } WINED3DBLEND;
473
474 typedef enum _WINED3DBLENDOP {
475     WINED3DBLENDOP_ADD              = 1,
476     WINED3DBLENDOP_SUBTRACT         = 2,
477     WINED3DBLENDOP_REVSUBTRACT      = 3,
478     WINED3DBLENDOP_MIN              = 4,
479     WINED3DBLENDOP_MAX              = 5,
480
481     WINED3DBLENDOP_FORCE_DWORD      = 0x7fffffff
482 } WINED3DBLENDOP;
483
484 typedef enum _WINED3DVERTEXBLENDFLAGS {
485     WINED3DVBF_DISABLE  =   0,
486     WINED3DVBF_1WEIGHTS =   1,
487     WINED3DVBF_2WEIGHTS =   2,
488     WINED3DVBF_3WEIGHTS =   3,
489     WINED3DVBF_TWEENING = 255,
490     WINED3DVBF_0WEIGHTS = 256
491 } WINED3DVERTEXBLENDFLAGS;
492
493 typedef enum _WINED3DCMPFUNC {
494     WINED3DCMP_NEVER                = 1,
495     WINED3DCMP_LESS                 = 2,
496     WINED3DCMP_EQUAL                = 3,
497     WINED3DCMP_LESSEQUAL            = 4,
498     WINED3DCMP_GREATER              = 5,
499     WINED3DCMP_NOTEQUAL             = 6,
500     WINED3DCMP_GREATEREQUAL         = 7,
501     WINED3DCMP_ALWAYS               = 8,
502
503     WINED3DCMP_FORCE_DWORD          = 0x7fffffff
504 } WINED3DCMPFUNC;
505
506 typedef enum _WINED3DZBUFFERTYPE {
507     WINED3DZB_FALSE                 = 0,
508     WINED3DZB_TRUE                  = 1,
509     WINED3DZB_USEW                  = 2,
510
511     WINED3DZB_FORCE_DWORD           = 0x7fffffff
512 } WINED3DZBUFFERTYPE;
513
514 typedef enum _WINED3DFOGMODE {
515     WINED3DFOG_NONE                 = 0,
516     WINED3DFOG_EXP                  = 1,
517     WINED3DFOG_EXP2                 = 2,
518     WINED3DFOG_LINEAR               = 3,
519
520     WINED3DFOG_FORCE_DWORD          = 0x7fffffff
521 } WINED3DFOGMODE;
522
523 typedef enum _WINED3DSHADEMODE {
524     WINED3DSHADE_FLAT               = 1,
525     WINED3DSHADE_GOURAUD            = 2,
526     WINED3DSHADE_PHONG              = 3,
527
528     WINED3DSHADE_FORCE_DWORD        = 0x7fffffff
529 } WINED3DSHADEMODE;
530
531 typedef enum _WINED3DFILLMODE {
532     WINED3DFILL_POINT               = 1,
533     WINED3DFILL_WIREFRAME           = 2,
534     WINED3DFILL_SOLID               = 3,
535
536     WINED3DFILL_FORCE_DWORD         = 0x7fffffff
537 } WINED3DFILLMODE;
538
539 typedef enum _WINED3DCULL {
540     WINED3DCULL_NONE                = 1,
541     WINED3DCULL_CW                  = 2,
542     WINED3DCULL_CCW                 = 3,
543
544     WINED3DCULL_FORCE_DWORD         = 0x7fffffff
545 } WINED3DCULL;
546
547 typedef enum _WINED3DSTENCILOP {
548     WINED3DSTENCILOP_KEEP           = 1,
549     WINED3DSTENCILOP_ZERO           = 2,
550     WINED3DSTENCILOP_REPLACE        = 3,
551     WINED3DSTENCILOP_INCRSAT        = 4,
552     WINED3DSTENCILOP_DECRSAT        = 5,
553     WINED3DSTENCILOP_INVERT         = 6,
554     WINED3DSTENCILOP_INCR           = 7,
555     WINED3DSTENCILOP_DECR           = 8,
556
557     WINED3DSTENCILOP_FORCE_DWORD    = 0x7fffffff
558 } WINED3DSTENCILOP;
559
560 typedef enum _WINED3DMATERIALCOLORSOURCE {
561     WINED3DMCS_MATERIAL         = 0,
562     WINED3DMCS_COLOR1           = 1,
563     WINED3DMCS_COLOR2           = 2,
564
565     WINED3DMCS_FORCE_DWORD      = 0x7fffffff
566 } WINED3DMATERIALCOLORSOURCE;
567
568 typedef enum _WINED3DPATCHEDGESTYLE {
569    WINED3DPATCHEDGE_DISCRETE    = 0,
570    WINED3DPATCHEDGE_CONTINUOUS  = 1,
571
572    WINED3DPATCHEDGE_FORCE_DWORD = 0x7fffffff,
573 } WINED3DPATCHEDGESTYLE;
574
575 typedef struct _WINED3DDISPLAYMODE {
576     UINT            Width;
577     UINT            Height;
578     UINT            RefreshRate;
579     WINED3DFORMAT   Format;
580 } WINED3DDISPLAYMODE;
581
582 typedef enum _WINED3DBACKBUFFER_TYPE {
583     WINED3DBACKBUFFER_TYPE_MONO         = 0,
584     WINED3DBACKBUFFER_TYPE_LEFT         = 1,
585     WINED3DBACKBUFFER_TYPE_RIGHT        = 2,
586
587     WINED3DBACKBUFFER_TYPE_FORCE_DWORD  = 0x7fffffff
588 } WINED3DBACKBUFFER_TYPE;
589
590 typedef enum _WINED3DSWAPEFFECT {
591     WINED3DSWAPEFFECT_DISCARD         = 1,
592     WINED3DSWAPEFFECT_FLIP            = 2,
593     WINED3DSWAPEFFECT_COPY            = 3,
594     WINED3DSWAPEFFECT_COPY_VSYNC      = 4,
595     WINED3DSWAPEFFECT_FORCE_DWORD     = 0xFFFFFFFF
596 } WINED3DSWAPEFFECT;
597
598 typedef enum _WINED3DSAMPLERSTATETYPE {
599     WINED3DSAMP_ADDRESSU       = 1,
600     WINED3DSAMP_ADDRESSV       = 2,
601     WINED3DSAMP_ADDRESSW       = 3,
602     WINED3DSAMP_BORDERCOLOR    = 4,
603     WINED3DSAMP_MAGFILTER      = 5,
604     WINED3DSAMP_MINFILTER      = 6,
605     WINED3DSAMP_MIPFILTER      = 7,
606     WINED3DSAMP_MIPMAPLODBIAS  = 8,
607     WINED3DSAMP_MAXMIPLEVEL    = 9,
608     WINED3DSAMP_MAXANISOTROPY  = 10,
609     WINED3DSAMP_SRGBTEXTURE    = 11,
610     WINED3DSAMP_ELEMENTINDEX   = 12,
611     WINED3DSAMP_DMAPOFFSET     = 13,
612
613     WINED3DSAMP_FORCE_DWORD   = 0x7fffffff,
614 } WINED3DSAMPLERSTATETYPE;
615 #define WINED3D_HIGHEST_SAMPLER_STATE WINED3DSAMP_DMAPOFFSET
616
617 typedef enum _WINED3DMULTISAMPLE_TYPE {
618     WINED3DMULTISAMPLE_NONE          =  0,
619     WINED3DMULTISAMPLE_NONMASKABLE   =  1,
620     WINED3DMULTISAMPLE_2_SAMPLES     =  2,
621     WINED3DMULTISAMPLE_3_SAMPLES     =  3,
622     WINED3DMULTISAMPLE_4_SAMPLES     =  4,
623     WINED3DMULTISAMPLE_5_SAMPLES     =  5,
624     WINED3DMULTISAMPLE_6_SAMPLES     =  6,
625     WINED3DMULTISAMPLE_7_SAMPLES     =  7,
626     WINED3DMULTISAMPLE_8_SAMPLES     =  8,
627     WINED3DMULTISAMPLE_9_SAMPLES     =  9,
628     WINED3DMULTISAMPLE_10_SAMPLES    = 10,
629     WINED3DMULTISAMPLE_11_SAMPLES    = 11,
630     WINED3DMULTISAMPLE_12_SAMPLES    = 12,
631     WINED3DMULTISAMPLE_13_SAMPLES    = 13,
632     WINED3DMULTISAMPLE_14_SAMPLES    = 14,
633     WINED3DMULTISAMPLE_15_SAMPLES    = 15,
634     WINED3DMULTISAMPLE_16_SAMPLES    = 16,
635
636     WINED3DMULTISAMPLE_FORCE_DWORD   = 0xffffffff
637 } WINED3DMULTISAMPLE_TYPE;
638
639 typedef enum _WINED3DTEXTURESTAGESTATETYPE {
640     WINED3DTSS_COLOROP               =  1,
641     WINED3DTSS_COLORARG1             =  2,
642     WINED3DTSS_COLORARG2             =  3,
643     WINED3DTSS_ALPHAOP               =  4,
644     WINED3DTSS_ALPHAARG1             =  5,
645     WINED3DTSS_ALPHAARG2             =  6,
646     WINED3DTSS_BUMPENVMAT00          =  7,
647     WINED3DTSS_BUMPENVMAT01          =  8,
648     WINED3DTSS_BUMPENVMAT10          =  9,
649     WINED3DTSS_BUMPENVMAT11          = 10,
650     WINED3DTSS_TEXCOORDINDEX         = 11,
651     WINED3DTSS_ADDRESS               = 12,
652     WINED3DTSS_ADDRESSU              = 13,
653     WINED3DTSS_ADDRESSV              = 14,
654     WINED3DTSS_BORDERCOLOR           = 15,
655     WINED3DTSS_MAGFILTER             = 16,
656     WINED3DTSS_MINFILTER             = 17,
657     WINED3DTSS_MIPFILTER             = 18,
658     WINED3DTSS_MIPMAPLODBIAS         = 19,
659     WINED3DTSS_MAXMIPLEVEL           = 20,
660     WINED3DTSS_MAXANISOTROPY         = 21,
661     WINED3DTSS_BUMPENVLSCALE         = 22,
662     WINED3DTSS_BUMPENVLOFFSET        = 23,
663     WINED3DTSS_TEXTURETRANSFORMFLAGS = 24,
664     WINED3DTSS_ADDRESSW              = 25,
665     WINED3DTSS_COLORARG0             = 26,
666     WINED3DTSS_ALPHAARG0             = 27,
667     WINED3DTSS_RESULTARG             = 28,
668     WINED3DTSS_CONSTANT              = 32,
669
670     WINED3DTSS_FORCE_DWORD           = 0x7fffffff
671 } WINED3DTEXTURESTAGESTATETYPE;
672
673 #define WINED3DTSS_TCI_PASSTHRU                       0x00000
674 #define WINED3DTSS_TCI_CAMERASPACENORMAL              0x10000
675 #define WINED3DTSS_TCI_CAMERASPACEPOSITION            0x20000
676 #define WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR    0x30000
677 #define WINED3DTSS_TCI_SPHEREMAP                      0x40000
678
679 #define WINED3D_HIGHEST_TEXTURE_STATE WINED3DTSS_CONSTANT
680
681 typedef enum _WINED3DTEXTURETRANSFORMFLAGS {
682     WINED3DTTFF_DISABLE         =   0,
683     WINED3DTTFF_COUNT1          =   1,
684     WINED3DTTFF_COUNT2          =   2,
685     WINED3DTTFF_COUNT3          =   3,
686     WINED3DTTFF_COUNT4          =   4,
687     WINED3DTTFF_PROJECTED       = 256,
688
689     WINED3DTTFF_FORCE_DWORD     = 0x7fffffff
690 } WINED3DTEXTURETRANSFORMFLAGS;
691
692 typedef enum _WINED3DTEXTUREOP {
693     WINED3DTOP_DISABLE                   =  1,
694     WINED3DTOP_SELECTARG1                =  2,
695     WINED3DTOP_SELECTARG2                =  3,
696     WINED3DTOP_MODULATE                  =  4,
697     WINED3DTOP_MODULATE2X                =  5,
698     WINED3DTOP_MODULATE4X                =  6,
699     WINED3DTOP_ADD                       =  7,
700     WINED3DTOP_ADDSIGNED                 =  8,
701     WINED3DTOP_ADDSIGNED2X               =  9,
702     WINED3DTOP_SUBTRACT                  = 10,
703     WINED3DTOP_ADDSMOOTH                 = 11,
704     WINED3DTOP_BLENDDIFFUSEALPHA         = 12,
705     WINED3DTOP_BLENDTEXTUREALPHA         = 13,
706     WINED3DTOP_BLENDFACTORALPHA          = 14,
707     WINED3DTOP_BLENDTEXTUREALPHAPM       = 15,
708     WINED3DTOP_BLENDCURRENTALPHA         = 16,
709     WINED3DTOP_PREMODULATE               = 17,
710     WINED3DTOP_MODULATEALPHA_ADDCOLOR    = 18,
711     WINED3DTOP_MODULATECOLOR_ADDALPHA    = 19,
712     WINED3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
713     WINED3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
714     WINED3DTOP_BUMPENVMAP                = 22,
715     WINED3DTOP_BUMPENVMAPLUMINANCE       = 23,
716     WINED3DTOP_DOTPRODUCT3               = 24,
717     WINED3DTOP_MULTIPLYADD               = 25,
718     WINED3DTOP_LERP                      = 26,
719
720     WINED3DTOP_FORCE_DWORD               = 0x7fffffff,
721 } WINED3DTEXTUREOP;
722
723 #define WINED3DTA_SELECTMASK        0x0000000f
724 #define WINED3DTA_DIFFUSE           0x00000000
725 #define WINED3DTA_CURRENT           0x00000001
726 #define WINED3DTA_TEXTURE           0x00000002
727 #define WINED3DTA_TFACTOR           0x00000003
728 #define WINED3DTA_SPECULAR          0x00000004
729 #define WINED3DTA_TEMP              0x00000005
730 #define WINED3DTA_CONSTANT          0x00000006
731 #define WINED3DTA_COMPLEMENT        0x00000010
732 #define WINED3DTA_ALPHAREPLICATE    0x00000020
733
734 typedef enum _WINED3DTEXTUREADDRESS {
735     WINED3DTADDRESS_WRAP            = 1,
736     WINED3DTADDRESS_MIRROR          = 2,
737     WINED3DTADDRESS_CLAMP           = 3,
738     WINED3DTADDRESS_BORDER          = 4,
739     WINED3DTADDRESS_MIRRORONCE      = 5,
740
741     WINED3DTADDRESS_FORCE_DWORD     = 0x7fffffff
742 } WINED3DTEXTUREADDRESS;
743
744 typedef enum _WINED3DTRANSFORMSTATETYPE {
745     WINED3DTS_VIEW            =  2,
746     WINED3DTS_PROJECTION      =  3,
747     WINED3DTS_TEXTURE0        = 16,
748     WINED3DTS_TEXTURE1        = 17,
749     WINED3DTS_TEXTURE2        = 18,
750     WINED3DTS_TEXTURE3        = 19,
751     WINED3DTS_TEXTURE4        = 20,
752     WINED3DTS_TEXTURE5        = 21,
753     WINED3DTS_TEXTURE6        = 22,
754     WINED3DTS_TEXTURE7        = 23,
755
756     WINED3DTS_FORCE_DWORD     = 0x7fffffff
757 } WINED3DTRANSFORMSTATETYPE;
758
759 #define WINED3DTS_WORLD  WINED3DTS_WORLDMATRIX(0)
760 #define WINED3DTS_WORLD1 WINED3DTS_WORLDMATRIX(1)
761 #define WINED3DTS_WORLD2 WINED3DTS_WORLDMATRIX(2)
762 #define WINED3DTS_WORLD3 WINED3DTS_WORLDMATRIX(3)
763 #define WINED3DTS_WORLDMATRIX(index) (WINED3DTRANSFORMSTATETYPE)(index + 256)
764
765 typedef enum _WINED3DBASISTYPE {
766    WINED3DBASIS_BEZIER        = 0,
767    WINED3DBASIS_BSPLINE       = 1,
768    WINED3DBASIS_INTERPOLATE   = 2,
769
770    WINED3DBASIS_FORCE_DWORD   = 0x7fffffff
771 } WINED3DBASISTYPE;
772
773 typedef enum _WINED3DCUBEMAP_FACES {
774     WINED3DCUBEMAP_FACE_POSITIVE_X     = 0,
775     WINED3DCUBEMAP_FACE_NEGATIVE_X     = 1,
776     WINED3DCUBEMAP_FACE_POSITIVE_Y     = 2,
777     WINED3DCUBEMAP_FACE_NEGATIVE_Y     = 3,
778     WINED3DCUBEMAP_FACE_POSITIVE_Z     = 4,
779     WINED3DCUBEMAP_FACE_NEGATIVE_Z     = 5,
780
781     WINED3DCUBEMAP_FACE_FORCE_DWORD    = 0xffffffff
782 } WINED3DCUBEMAP_FACES;
783
784 typedef enum _WINED3DTEXTUREFILTERTYPE {
785     WINED3DTEXF_NONE            = 0,
786     WINED3DTEXF_POINT           = 1,
787     WINED3DTEXF_LINEAR          = 2,
788     WINED3DTEXF_ANISOTROPIC     = 3,
789     WINED3DTEXF_FLATCUBIC       = 4,
790     WINED3DTEXF_GAUSSIANCUBIC   = 5,
791     WINED3DTEXF_PYRAMIDALQUAD   = 6,
792     WINED3DTEXF_GAUSSIANQUAD    = 7,
793     WINED3DTEXF_FORCE_DWORD     = 0x7fffffff
794 } WINED3DTEXTUREFILTERTYPE;
795
796 typedef struct _WINEDD3DRECTPATCH_INFO {
797     UINT                StartVertexOffsetWidth;
798     UINT                StartVertexOffsetHeight;
799     UINT                Width;
800     UINT                Height;
801     UINT                Stride;
802     WINED3DBASISTYPE    Basis;
803     WINED3DDEGREETYPE   Degree;
804 } WINED3DRECTPATCH_INFO;
805
806 typedef struct _WINED3DTRIPATCH_INFO {
807     UINT                StartVertexOffset;
808     UINT                NumVertices;
809     WINED3DBASISTYPE    Basis;
810     WINED3DDEGREETYPE   Degree;
811 } WINED3DTRIPATCH_INFO;
812
813
814 typedef struct _WINED3DADAPTER_IDENTIFIER {
815     char           *Driver;
816     char           *Description;
817     char           *DeviceName;
818     LARGE_INTEGER  *DriverVersion; 
819     DWORD          *VendorId;
820     DWORD          *DeviceId;
821     DWORD          *SubSysId;
822     DWORD          *Revision;
823     GUID           *DeviceIdentifier;
824     DWORD          *WHQLLevel;
825 } WINED3DADAPTER_IDENTIFIER;
826
827 typedef struct _WINED3DPRESENT_PARAMETERS {
828     UINT                    *BackBufferWidth;
829     UINT                    *BackBufferHeight;
830     WINED3DFORMAT           *BackBufferFormat;
831     UINT                    *BackBufferCount;
832     WINED3DMULTISAMPLE_TYPE *MultiSampleType;
833     DWORD                   *MultiSampleQuality;
834     WINED3DSWAPEFFECT       *SwapEffect;
835     HWND                    *hDeviceWindow;
836     BOOL                    *Windowed;
837     BOOL                    *EnableAutoDepthStencil;
838     WINED3DFORMAT           *AutoDepthStencilFormat;
839     DWORD                   *Flags;
840     UINT                    *FullScreen_RefreshRateInHz;
841     UINT                    *PresentationInterval;
842 } WINED3DPRESENT_PARAMETERS;
843
844 typedef enum _WINED3DRESOURCETYPE {
845     WINED3DRTYPE_SURFACE                =  1,
846     WINED3DRTYPE_VOLUME                 =  2,
847     WINED3DRTYPE_TEXTURE                =  3,
848     WINED3DRTYPE_VOLUMETEXTURE          =  4,
849     WINED3DRTYPE_CUBETEXTURE            =  5,
850     WINED3DRTYPE_VERTEXBUFFER           =  6,
851     WINED3DRTYPE_INDEXBUFFER            =  7,
852
853     WINED3DRTYPE_FORCE_DWORD            = 0x7fffffff
854 } WINED3DRESOURCETYPE;
855
856 #define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER+1)
857
858 typedef enum _WINED3DPOOL {
859     WINED3DPOOL_DEFAULT                 = 0,
860     WINED3DPOOL_MANAGED                 = 1,
861     WINED3DPOOL_SYSTEMMEM               = 2,
862     WINED3DPOOL_SCRATCH                 = 3,
863
864     WINED3DPOOL_FORCE_DWORD             = 0x7fffffff
865 } WINED3DPOOL;
866
867 typedef struct _WINED3DSURFACE_DESC
868 {
869     WINED3DFORMAT           *Format;
870     WINED3DRESOURCETYPE     *Type;
871     DWORD                   *Usage;
872     WINED3DPOOL             *Pool;
873     UINT                    *Size;
874
875     WINED3DMULTISAMPLE_TYPE *MultiSampleType;
876     DWORD                   *MultiSampleQuality;
877     UINT                    *Width;
878     UINT                    *Height;
879 } WINED3DSURFACE_DESC;
880
881 typedef struct _WINED3DVOLUME_DESC
882 {
883     WINED3DFORMAT       *Format;
884     WINED3DRESOURCETYPE *Type;
885     DWORD               *Usage;
886     WINED3DPOOL         *Pool;
887     UINT                *Size;
888
889     UINT                *Width;
890     UINT                *Height;
891     UINT                *Depth;
892 } WINED3DVOLUME_DESC;
893
894 typedef struct _WINED3DCLIPSTATUS {
895    DWORD ClipUnion;
896    DWORD ClipIntersection;
897 } WINED3DCLIPSTATUS;
898
899
900 typedef struct _WINED3DVERTEXELEMENT {
901   WORD    Stream;
902   WORD    Offset;
903   BYTE    Type;
904   BYTE    Method;
905   BYTE    Usage;
906   BYTE    UsageIndex;
907   int     Reg; /* DirectX 8 */
908 } WINED3DVERTEXELEMENT, *LPWINED3DVERTEXELEMENT;
909
910
911 typedef enum _WINED3DQUERYTYPE {
912     WINED3DQUERYTYPE_VCACHE             = 4,
913     WINED3DQUERYTYPE_RESOURCEMANAGER    = 5,
914     WINED3DQUERYTYPE_VERTEXSTATS        = 6,
915     WINED3DQUERYTYPE_EVENT              = 8,
916     WINED3DQUERYTYPE_OCCLUSION          = 9,
917     WINED3DQUERYTYPE_TIMESTAMP          = 10,
918     WINED3DQUERYTYPE_TIMESTAMPDISJOINT  = 11,
919     WINED3DQUERYTYPE_TIMESTAMPFREQ      = 12,
920     WINED3DQUERYTYPE_PIPELINETIMINGS    = 13,
921     WINED3DQUERYTYPE_INTERFACETIMINGS   = 14,
922     WINED3DQUERYTYPE_VERTEXTIMINGS      = 15,
923     WINED3DQUERYTYPE_PIXELTIMINGS       = 16,
924     WINED3DQUERYTYPE_BANDWIDTHTIMINGS   = 17,
925     WINED3DQUERYTYPE_CACHEUTILIZATION   = 18
926 } WINED3DQUERYTYPE;
927
928 #define WINED3DISSUE_BEGIN   (1 << 1)
929 #define WINED3DISSUE_END     (1 << 0)
930 #define WINED3DGETDATA_FLUSH (1 << 0)
931
932 typedef struct _WINED3DDEVICE_CREATION_PARAMETERS {
933     UINT           AdapterOrdinal;
934     WINED3DDEVTYPE DeviceType;
935     HWND           hFocusWindow;
936     DWORD          BehaviorFlags;
937 } WINED3DDEVICE_CREATION_PARAMETERS;
938
939 typedef struct _WINED3DDEVINFO_BANDWIDTHTIMINGS {
940     float         MaxBandwidthUtilized;
941     float         FrontEndUploadMemoryUtilizedPercent;
942     float         VertexRateUtilizedPercent;
943     float         TriangleSetupRateUtilizedPercent;
944     float         FillRateUtilizedPercent;
945 } WINED3DDEVINFO_BANDWIDTHTIMINGS;
946
947 typedef struct _WINED3DDEVINFO_CACHEUTILIZATION {
948     float         TextureCacheHitRate;
949     float         PostTransformVertexCacheHitRate;
950 } WINED3DDEVINFO_CACHEUTILIZATION;
951
952 typedef struct _WINED3DDEVINFO_INTERFACETIMINGS {
953     float         WaitingForGPUToUseApplicationResourceTimePercent;
954     float         WaitingForGPUToAcceptMoreCommandsTimePercent;
955     float         WaitingForGPUToStayWithinLatencyTimePercent;
956     float         WaitingForGPUExclusiveResourceTimePercent;
957     float         WaitingForGPUOtherTimePercent;
958 } WINED3DDEVINFO_INTERFACETIMINGS;
959
960 typedef struct _WINED3DDEVINFO_PIPELINETIMINGS {
961     float         VertexProcessingTimePercent;
962     float         PixelProcessingTimePercent;
963     float         OtherGPUProcessingTimePercent;
964     float         GPUIdleTimePercent;
965 } WINED3DDEVINFO_PIPELINETIMINGS;
966
967 typedef struct _WINED3DDEVINFO_STAGETIMINGS {
968     float         MemoryProcessingPercent;
969     float         ComputationProcessingPercent;
970 } WINED3DDEVINFO_STAGETIMINGS;
971
972 typedef struct _WINED3DRASTER_STATUS {
973     BOOL            InVBlank;
974     UINT            ScanLine;
975 } WINED3DRASTER_STATUS;
976
977
978 typedef struct WINED3DRESOURCESTATS {
979     BOOL                bThrashing;
980     DWORD               ApproxBytesDownloaded;
981     DWORD               NumEvicts;
982     DWORD               NumVidCreates;
983     DWORD               LastPri;
984     DWORD               NumUsed;
985     DWORD               NumUsedInVidMem;
986     DWORD               WorkingSet;
987     DWORD               WorkingSetBytes;
988     DWORD               TotalManaged;
989     DWORD               TotalBytes;
990 } WINED3DRESOURCESTATS;
991
992 typedef struct _WINED3DDEVINFO_RESOURCEMANAGER {
993     WINED3DRESOURCESTATS stats[WINED3DRTYPECOUNT];
994 } WINED3DDEVINFO_RESOURCEMANAGER;
995
996 typedef struct _WINED3DDEVINFO_VERTEXSTATS {
997     DWORD NumRenderedTriangles;
998     DWORD NumExtraClippingTriangles;
999 } WINED3DDEVINFO_VERTEXSTATS;
1000
1001 typedef struct _WINED3DLOCKED_RECT {
1002     INT                 Pitch;
1003     void*               pBits;
1004 } WINED3DLOCKED_RECT;
1005
1006 typedef struct _WINED3DLOCKED_BOX {
1007     INT                 RowPitch;
1008     INT                 SlicePitch;
1009     void*               pBits;
1010 } WINED3DLOCKED_BOX;
1011
1012
1013 typedef struct _WINED3DBOX {
1014     UINT                Left;
1015     UINT                Top;
1016     UINT                Right;
1017     UINT                Bottom;
1018     UINT                Front;
1019     UINT                Back;
1020 } WINED3DBOX;
1021
1022 /*Vertex cache optimization hints.*/
1023 typedef struct WINED3DDEVINFO_VCACHE {
1024     /*Must be a 4 char code FOURCC (e.g. CACH)*/
1025     DWORD         Pattern; 
1026     /*0 to get the longest  strips, 1 vertex cache*/
1027     DWORD         OptMethod; 
1028      /*Cache size to use (only valid if OptMethod==1) */
1029     DWORD         CacheSize;
1030     /*internal for deciding when to restart strips, non user modifyable (only valid if OptMethod==1)*/
1031     DWORD         MagicNumber; 
1032 } WINED3DDEVINFO_VCACHE;
1033
1034 typedef struct _WINED3DVERTEXBUFFER_DESC {
1035     WINED3DFORMAT           Format;
1036     WINED3DRESOURCETYPE     Type;
1037     DWORD                   Usage;
1038     WINED3DPOOL             Pool;
1039     UINT                    Size;
1040     DWORD                   FVF;
1041 } WINED3DVERTEXBUFFER_DESC;
1042
1043 typedef struct _WINED3DINDEXBUFFER_DESC {
1044     WINED3DFORMAT           Format;
1045     WINED3DRESOURCETYPE     Type;
1046     DWORD                   Usage;
1047     WINED3DPOOL             Pool;
1048     UINT                    Size;
1049 } WINED3DINDEXBUFFER_DESC;
1050
1051 /*
1052  * The wined3dcaps structure
1053  */
1054
1055 typedef struct _WINED3DVSHADERCAPS2_0 {
1056   DWORD  *Caps;
1057   INT    *DynamicFlowControlDepth;
1058   INT    *NumTemps;
1059   INT    *StaticFlowControlDepth;
1060 } WINED3DVSHADERCAPS2_0;
1061
1062 typedef struct _WINED3DPSHADERCAPS2_0 {
1063   DWORD  *Caps;
1064   INT    *DynamicFlowControlDepth;
1065   INT    *NumTemps;
1066   INT    *StaticFlowControlDepth;
1067   INT    *NumInstructionSlots;
1068 } WINED3DPSHADERCAPS2_0;
1069
1070 typedef struct _WINED3DCAPS {
1071   WINED3DDEVTYPE      *DeviceType;
1072   UINT                *AdapterOrdinal;
1073
1074   DWORD               *Caps;
1075   DWORD               *Caps2;
1076   DWORD               *Caps3;
1077   DWORD               *PresentationIntervals;
1078
1079   DWORD               *CursorCaps;
1080
1081   DWORD               *DevCaps;
1082
1083   DWORD               *PrimitiveMiscCaps;
1084   DWORD               *RasterCaps;
1085   DWORD               *ZCmpCaps;
1086   DWORD               *SrcBlendCaps;
1087   DWORD               *DestBlendCaps;
1088   DWORD               *AlphaCmpCaps;
1089   DWORD               *ShadeCaps;
1090   DWORD               *TextureCaps;
1091   DWORD               *TextureFilterCaps;
1092   DWORD               *CubeTextureFilterCaps;
1093   DWORD               *VolumeTextureFilterCaps;
1094   DWORD               *TextureAddressCaps;
1095   DWORD               *VolumeTextureAddressCaps;
1096
1097   DWORD               *LineCaps;
1098
1099   DWORD               *MaxTextureWidth;
1100   DWORD               *MaxTextureHeight;
1101   DWORD               *MaxVolumeExtent;
1102
1103   DWORD               *MaxTextureRepeat;
1104   DWORD               *MaxTextureAspectRatio;
1105   DWORD               *MaxAnisotropy;
1106   float               *MaxVertexW;
1107
1108   float               *GuardBandLeft;
1109   float               *GuardBandTop;
1110   float               *GuardBandRight;
1111   float               *GuardBandBottom;
1112
1113   float               *ExtentsAdjust;
1114   DWORD               *StencilCaps;
1115
1116   DWORD               *FVFCaps;
1117   DWORD               *TextureOpCaps;
1118   DWORD               *MaxTextureBlendStages;
1119   DWORD               *MaxSimultaneousTextures;
1120
1121   DWORD               *VertexProcessingCaps;
1122   DWORD               *MaxActiveLights;
1123   DWORD               *MaxUserClipPlanes;
1124   DWORD               *MaxVertexBlendMatrices;
1125   DWORD               *MaxVertexBlendMatrixIndex;
1126
1127   float               *MaxPointSize;
1128
1129   DWORD               *MaxPrimitiveCount;
1130   DWORD               *MaxVertexIndex;
1131   DWORD               *MaxStreams;
1132   DWORD               *MaxStreamStride;
1133
1134   DWORD               *VertexShaderVersion;
1135   DWORD               *MaxVertexShaderConst;
1136
1137   DWORD               *PixelShaderVersion;
1138   float               *PixelShader1xMaxValue;
1139
1140   /* DX 9 */
1141   DWORD               *DevCaps2;
1142
1143   float               *MaxNpatchTessellationLevel;
1144   DWORD               *Reserved5; /*undocumented*/
1145
1146   UINT                *MasterAdapterOrdinal;
1147   UINT                *AdapterOrdinalInGroup;
1148   UINT                *NumberOfAdaptersInGroup;
1149   DWORD               *DeclTypes;
1150   DWORD               *NumSimultaneousRTs;
1151   DWORD               *StretchRectFilterCaps;
1152   WINED3DVSHADERCAPS2_0   VS20Caps;
1153   WINED3DPSHADERCAPS2_0   PS20Caps;
1154   DWORD               *VertexTextureFilterCaps;
1155   DWORD               *MaxVShaderInstructionsExecuted;
1156   DWORD               *MaxPShaderInstructionsExecuted;
1157   DWORD               *MaxVertexShader30InstructionSlots; 
1158   DWORD               *MaxPixelShader30InstructionSlots;
1159   DWORD               *Reserved2;/* Not in the microsoft headers but documented */
1160   DWORD               *Reserved3;
1161
1162 } WINED3DCAPS;
1163
1164 typedef enum _WINED3DSTATEBLOCKTYPE {
1165     WINED3DSBT_INIT          = 0,
1166     WINED3DSBT_ALL           = 1,
1167     WINED3DSBT_PIXELSTATE    = 2,
1168     WINED3DSBT_VERTEXSTATE   = 3,
1169
1170     WINED3DSBT_FORCE_DWORD   = 0xffffffff
1171 } WINED3DSTATEBLOCKTYPE;
1172
1173 typedef struct glDescriptor {
1174     UINT          textureName;
1175     int           level;
1176     int           target;
1177     int/*GLenum*/ glFormat;
1178     int/*GLenum*/ glFormatInternal;
1179     int/*GLenum*/ glType;
1180 } glDescriptor;
1181
1182 #define WINED3DDP_MAXTEXCOORD 8
1183
1184 typedef enum _WINED3DDECLMETHOD {
1185     WINED3DDECLMETHOD_DEFAULT          = 0,
1186     WINED3DDECLMETHOD_PARTIALU         = 1,
1187     WINED3DDECLMETHOD_PARTIALV         = 2,
1188     WINED3DDECLMETHOD_CROSSUV          = 3,
1189     WINED3DDECLMETHOD_UV               = 4,
1190     WINED3DDECLMETHOD_LOOKUP           = 5,
1191     WINED3DDECLMETHOD_LOOKUPPRESAMPLED = 6
1192 } WINED3DDECLMETHOD;
1193
1194 typedef enum _WINED3DDECLTYPE {
1195   WINED3DDECLTYPE_FLOAT1    =  0,
1196   WINED3DDECLTYPE_FLOAT2    =  1,
1197   WINED3DDECLTYPE_FLOAT3    =  2,
1198   WINED3DDECLTYPE_FLOAT4    =  3,
1199   WINED3DDECLTYPE_D3DCOLOR  =  4,
1200   WINED3DDECLTYPE_UBYTE4    =  5,
1201   WINED3DDECLTYPE_SHORT2    =  6,
1202   WINED3DDECLTYPE_SHORT4    =  7,
1203   /* VS 2.0 */
1204   WINED3DDECLTYPE_UBYTE4N   =  8,
1205   WINED3DDECLTYPE_SHORT2N   =  9,
1206   WINED3DDECLTYPE_SHORT4N   = 10,
1207   WINED3DDECLTYPE_USHORT2N  = 11,
1208   WINED3DDECLTYPE_USHORT4N  = 12,
1209   WINED3DDECLTYPE_UDEC3     = 13,
1210   WINED3DDECLTYPE_DEC3N     = 14,
1211   WINED3DDECLTYPE_FLOAT16_2 = 15,
1212   WINED3DDECLTYPE_FLOAT16_4 = 16,
1213   WINED3DDECLTYPE_UNUSED    = 17,
1214 } WINED3DDECLTYPE;
1215
1216 typedef struct WineDirect3DStridedData {
1217     BYTE     *lpData;        /* Pointer to start of data               */
1218     DWORD     dwStride;      /* Stride between occurances of this data */
1219     DWORD     dwType;        /* Type (as in D3DVSDT_TYPE)              */
1220     int       VBO;           /* Vertex buffer object this data is in   */
1221 } WineDirect3DStridedData;
1222
1223 typedef struct WineDirect3DVertexStridedData {
1224     union {
1225         struct {
1226
1227              /* Do not add or reorder fields here,
1228               * so this can be indexed as an array */
1229              WineDirect3DStridedData  position;
1230              WineDirect3DStridedData  blendWeights;
1231              WineDirect3DStridedData  blendMatrixIndices;
1232              WineDirect3DStridedData  normal;
1233              WineDirect3DStridedData  pSize;
1234              WineDirect3DStridedData  diffuse;
1235              WineDirect3DStridedData  specular;
1236              WineDirect3DStridedData  texCoords[WINED3DDP_MAXTEXCOORD];
1237              WineDirect3DStridedData  position2; /* tween data */
1238              WineDirect3DStridedData  normal2;   /* tween data */
1239              WineDirect3DStridedData  tangent;
1240              WineDirect3DStridedData  binormal;
1241              WineDirect3DStridedData  tessFactor;
1242              WineDirect3DStridedData  fog;
1243              WineDirect3DStridedData  depth;
1244              WineDirect3DStridedData  sample;
1245
1246              /* Add fields here */
1247              BOOL position_transformed;
1248
1249         } s;
1250         WineDirect3DStridedData input[16];  /* Indexed by constants in D3DVSDE_REGISTER */
1251     } u;
1252 } WineDirect3DVertexStridedData;
1253
1254 typedef struct _WINEDDOVERLAYFX
1255 {
1256     DWORD       dwSize;                         /* size of structure */
1257     DWORD       dwAlphaEdgeBlendBitDepth;       /* Bit depth used to specify constant for alpha edge blend */
1258     DWORD       dwAlphaEdgeBlend;               /* Constant to use as alpha for edge blend */
1259     DWORD       dwReserved;
1260     DWORD       dwAlphaDestConstBitDepth;       /* Bit depth used to specify alpha constant for destination */
1261     union
1262     {
1263         DWORD   dwAlphaDestConst;               /* Constant to use as alpha channel for dest */
1264         LPDIRECTDRAWSURFACE lpDDSAlphaDest;     /* Surface to use as alpha channel for dest */
1265     } DUMMYUNIONNAME1;
1266     DWORD       dwAlphaSrcConstBitDepth;        /* Bit depth used to specify alpha constant for source */
1267     union
1268     {
1269         DWORD   dwAlphaSrcConst;                /* Constant to use as alpha channel for src */
1270         LPDIRECTDRAWSURFACE lpDDSAlphaSrc;      /* Surface to use as alpha channel for src */
1271     } DUMMYUNIONNAME2;
1272     DDCOLORKEY  dckDestColorkey;                /* DestColorkey override */
1273     DDCOLORKEY  dckSrcColorkey;                 /* DestColorkey override */
1274     DWORD       dwDDFX;                         /* Overlay FX */
1275     DWORD       dwFlags;                        /* flags */
1276 } WINEDDOVERLAYFX;
1277
1278 /**************************** 
1279  *  * Vertex Shaders Declaration
1280  *   */
1281
1282 typedef enum _WINED3DDECLUSAGE {
1283       WINED3DSHADERDECLUSAGE_POSITION     = 0,
1284       WINED3DSHADERDECLUSAGE_BLENDWEIGHT,
1285       WINED3DSHADERDECLUSAGE_BLENDINDICES,
1286       WINED3DSHADERDECLUSAGE_NORMAL,
1287       WINED3DSHADERDECLUSAGE_PSIZE ,
1288       WINED3DSHADERDECLUSAGE_TEXCOORD0,
1289       WINED3DSHADERDECLUSAGE_TEXCOORD1,
1290       WINED3DSHADERDECLUSAGE_TEXCOORD2,
1291       WINED3DSHADERDECLUSAGE_TEXCOORD3,
1292       WINED3DSHADERDECLUSAGE_TEXCOORD4,
1293       WINED3DSHADERDECLUSAGE_TEXCOORD5,
1294       WINED3DSHADERDECLUSAGE_TEXCOORD6,
1295       WINED3DSHADERDECLUSAGE_TEXCOORD7,
1296       WINED3DSHADERDECLUSAGE_TANGENT,
1297       WINED3DSHADERDECLUSAGE_BINORMAL,
1298       WINED3DSHADERDECLUSAGE_TESSFACTOR,
1299       WINED3DSHADERDECLUSAGE_POSITIONT,
1300       WINED3DSHADERDECLUSAGE_DIFFUSE,
1301       WINED3DSHADERDECLUSAGE_SPECULAR,
1302       WINED3DSHADERDECLUSAGE_FOG,
1303       WINED3DSHADERDECLUSAGE_DEPTH,
1304       WINED3DSHADERDECLUSAGE_SAMPLE,
1305       WINED3DSHADERDECLUSAGE_POSITION2,
1306       WINED3DSHADERDECLUSAGE_POSITION21,
1307       WINED3DSHADERDECLUSAGE_POSITION22,
1308       WINED3DSHADERDECLUSAGE_POSITION23,
1309       WINED3DSHADERDECLUSAGE_POSITION24,
1310       WINED3DSHADERDECLUSAGE_POSITION25,
1311       WINED3DSHADERDECLUSAGE_POSITION26,
1312       WINED3DSHADERDECLUSAGE_POSITION27,
1313       WINED3DSHADERDECLUSAGE_POSITION28,
1314       WINED3DSHADERDECLUSAGE_NORMAL2,
1315       WINED3DSHADERDECLUSAGE_POSITIONT2,
1316       WINED3DSHADERDECLUSAGE_MAX_USAGE
1317 } WINED3DSHADERDECLUSAGE;
1318
1319 #define WINED3DUSAGE_RENDERTARGET                     0x00000001L
1320 #define WINED3DUSAGE_DEPTHSTENCIL                     0x00000002L
1321 #define WINED3DUSAGE_WRITEONLY                        0x00000008L
1322 #define WINED3DUSAGE_SOFTWAREPROCESSING               0x00000010L
1323 #define WINED3DUSAGE_DONOTCLIP                        0x00000020L
1324 #define WINED3DUSAGE_POINTS                           0x00000040L
1325 #define WINED3DUSAGE_RTPATCHES                        0x00000080L
1326 #define WINED3DUSAGE_NPATCHES                         0x00000100L
1327 #define WINED3DUSAGE_DYNAMIC                          0x00000200L
1328 #define WINED3DUSAGE_AUTOGENMIPMAP                    0x00000400L 
1329 #define WINED3DUSAGE_DMAP                             0x00004000L
1330 #define WINED3DUSAGE_MASK                             0x00004FFFL
1331 #define WINED3DUSAGE_OVERLAY                          0x00010000L
1332
1333 #define WINED3DUSAGE_QUERY_LEGACYBUMPMAP            0x00008000L
1334 #define WINED3DUSAGE_QUERY_FILTER                   0x00020000L
1335 #define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING 0x00080000L
1336 #define WINED3DUSAGE_QUERY_SRGBREAD                 0x00010000L
1337 #define WINED3DUSAGE_QUERY_SRGBWRITE                0x00040000L
1338 #define WINED3DUSAGE_QUERY_VERTEXTEXTURE            0x00100000L
1339 #define WINED3DUSAGE_QUERY_WRAPANDMIP               0x00200000L
1340 #define WINED3DUSAGE_QUERY_MASK                     0x002F8000L
1341
1342 typedef enum _WINED3DSURFTYPE {
1343     SURFACE_UNKNOWN    = 0,   /* Default / Unknown surface type */
1344     SURFACE_OPENGL,           /* OpenGL surface: Renders using libGL, needed for 3D */
1345     SURFACE_GDI,              /* User surface. No 3D, DirectDraw rendering with GDI */
1346     SURFACE_XRENDER           /* Future dreams: Use XRENDER / EXA / whatever stuff */
1347 } WINED3DSURFTYPE;
1348
1349 #define WINED3DCAPS2_NO2DDURING3DSCENE                 0x00000002L
1350 #define WINED3DCAPS2_FULLSCREENGAMMA                   0x00020000L
1351 #define WINED3DCAPS2_CANRENDERWINDOWED                 0x00080000L
1352 #define WINED3DCAPS2_CANCALIBRATEGAMMA                 0x00100000L
1353 #define WINED3DCAPS2_RESERVED                          0x02000000L
1354 #define WINED3DCAPS2_CANMANAGERESOURCE                 0x10000000L
1355 #define WINED3DCAPS2_DYNAMICTEXTURES                   0x20000000L
1356 #define WINED3DCAPS2_CANAUTOGENMIPMAP                  0x40000000L
1357
1358 #define WINED3DPRASTERCAPS_DITHER                     0x00000001L
1359 #define WINED3DPRASTERCAPS_ROP2                       0x00000002L
1360 #define WINED3DPRASTERCAPS_XOR                        0x00000004L
1361 #define WINED3DPRASTERCAPS_PAT                        0x00000008L
1362 #define WINED3DPRASTERCAPS_ZTEST                      0x00000010L
1363 #define WINED3DPRASTERCAPS_SUBPIXEL                   0x00000020L
1364 #define WINED3DPRASTERCAPS_SUBPIXELX                  0x00000040L
1365 #define WINED3DPRASTERCAPS_FOGVERTEX                  0x00000080L
1366 #define WINED3DPRASTERCAPS_FOGTABLE                   0x00000100L
1367 #define WINED3DPRASTERCAPS_STIPPLE                    0x00000200L
1368 #define WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT     0x00000400L
1369 #define WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT   0x00000800L
1370 #define WINED3DPRASTERCAPS_ANTIALIASEDGES             0x00001000L
1371 #define WINED3DPRASTERCAPS_MIPMAPLODBIAS              0x00002000L
1372 #define WINED3DPRASTERCAPS_ZBIAS                      0x00004000L
1373 #define WINED3DPRASTERCAPS_ZBUFFERLESSHSR             0x00008000L
1374 #define WINED3DPRASTERCAPS_FOGRANGE                   0x00010000L
1375 #define WINED3DPRASTERCAPS_ANISOTROPY                 0x00020000L
1376 #define WINED3DPRASTERCAPS_WBUFFER                    0x00040000L
1377 #define WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L
1378 #define WINED3DPRASTERCAPS_WFOG                       0x00100000L
1379 #define WINED3DPRASTERCAPS_ZFOG                       0x00200000L
1380 #define WINED3DPRASTERCAPS_COLORPERSPECTIVE           0x00400000L
1381 #define WINED3DPRASTERCAPS_SCISSORTEST                0x01000000L
1382 #define WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS        0x02000000L
1383 #define WINED3DPRASTERCAPS_DEPTHBIAS                  0x04000000L 
1384 #define WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE         0x08000000L
1385
1386 #define WINED3DPSHADECAPS_COLORFLATMONO               0x000001
1387 #define WINED3DPSHADECAPS_COLORFLATRGB                0x000002
1388 #define WINED3DPSHADECAPS_COLORGOURAUDMONO            0x000004
1389 #define WINED3DPSHADECAPS_COLORGOURAUDRGB             0x000008
1390 #define WINED3DPSHADECAPS_COLORPHONGMONO              0x000010
1391 #define WINED3DPSHADECAPS_COLORPHONGRGB               0x000020
1392 #define WINED3DPSHADECAPS_SPECULARFLATMONO            0x000040
1393 #define WINED3DPSHADECAPS_SPECULARFLATRGB             0x000080
1394 #define WINED3DPSHADECAPS_SPECULARGOURAUDMONO         0x000100
1395 #define WINED3DPSHADECAPS_SPECULARGOURAUDRGB          0x000200
1396 #define WINED3DPSHADECAPS_SPECULARPHONGMONO           0x000400
1397 #define WINED3DPSHADECAPS_SPECULARPHONGRGB            0x000800
1398 #define WINED3DPSHADECAPS_ALPHAFLATBLEND              0x001000
1399 #define WINED3DPSHADECAPS_ALPHAFLATSTIPPLED           0x002000
1400 #define WINED3DPSHADECAPS_ALPHAGOURAUDBLEND           0x004000
1401 #define WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED        0x008000
1402 #define WINED3DPSHADECAPS_ALPHAPHONGBLEND             0x010000
1403 #define WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED          0x020000
1404 #define WINED3DPSHADECAPS_FOGFLAT                     0x040000
1405 #define WINED3DPSHADECAPS_FOGGOURAUD                  0x080000
1406 #define WINED3DPSHADECAPS_FOGPHONG                    0x100000
1407
1408 #define WINED3DPTEXTURECAPS_PERSPECTIVE              0x00000001L
1409 #define WINED3DPTEXTURECAPS_POW2                     0x00000002L
1410 #define WINED3DPTEXTURECAPS_ALPHA                    0x00000004L
1411 #define WINED3DPTEXTURECAPS_TRANSPARENCY             0x00000008L
1412 #define WINED3DPTEXTURECAPS_BORDER                   0x00000010L
1413 #define WINED3DPTEXTURECAPS_SQUAREONLY               0x00000020L
1414 #define WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
1415 #define WINED3DPTEXTURECAPS_ALPHAPALETTE             0x00000080L
1416 #define WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL       0x00000100L
1417 #define WINED3DPTEXTURECAPS_PROJECTED                0x00000400L
1418 #define WINED3DPTEXTURECAPS_CUBEMAP                  0x00000800L
1419 #define WINED3DPTEXTURECAPS_COLORKEYBLEND            0x00001000L
1420 #define WINED3DPTEXTURECAPS_VOLUMEMAP                0x00002000L
1421 #define WINED3DPTEXTURECAPS_MIPMAP                   0x00004000L
1422 #define WINED3DPTEXTURECAPS_MIPVOLUMEMAP             0x00008000L
1423 #define WINED3DPTEXTURECAPS_MIPCUBEMAP               0x00010000L
1424 #define WINED3DPTEXTURECAPS_CUBEMAP_POW2             0x00020000L
1425 #define WINED3DPTEXTURECAPS_VOLUMEMAP_POW2           0x00040000L
1426 #define WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV       0x00200000L
1427
1428 #define WINED3DPTFILTERCAPS_NEAREST                  0x00000001
1429 #define WINED3DPTFILTERCAPS_LINEAR                   0x00000002
1430 #define WINED3DPTFILTERCAPS_MIPNEAREST               0x00000004
1431 #define WINED3DPTFILTERCAPS_MIPLINEAR                0x00000008
1432 #define WINED3DPTFILTERCAPS_LINEARMIPNEAREST         0x00000010
1433 #define WINED3DPTFILTERCAPS_LINEARMIPLINEAR          0x00000020
1434 #define WINED3DPTFILTERCAPS_MINFPOINT                0x00000100
1435 #define WINED3DPTFILTERCAPS_MINFLINEAR               0x00000200
1436 #define WINED3DPTFILTERCAPS_MINFANISOTROPIC          0x00000400
1437 #define WINED3DPTFILTERCAPS_MIPFPOINT                0x00010000
1438 #define WINED3DPTFILTERCAPS_MIPFLINEAR               0x00020000
1439 #define WINED3DPTFILTERCAPS_MAGFPOINT                0x01000000
1440 #define WINED3DPTFILTERCAPS_MAGFLINEAR               0x02000000
1441 #define WINED3DPTFILTERCAPS_MAGFANISOTROPIC          0x04000000
1442 #define WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD        0x08000000
1443 #define WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD         0x10000000
1444
1445 #define WINED3DVTXPCAPS_TEXGEN                       0x00000001L
1446 #define WINED3DVTXPCAPS_MATERIALSOURCE7              0x00000002L
1447 #define WINED3DVTXPCAPS_VERTEXFOG                    0x00000004L
1448 #define WINED3DVTXPCAPS_DIRECTIONALLIGHTS            0x00000008L
1449 #define WINED3DVTXPCAPS_POSITIONALLIGHTS             0x00000010L
1450 #define WINED3DVTXPCAPS_LOCALVIEWER                  0x00000020L
1451 #define WINED3DVTXPCAPS_TWEENING                     0x00000040L
1452 #define WINED3DVTXPCAPS_TEXGEN_SPHEREMAP             0x00000100L
1453 #define WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER     0x00000200L
1454
1455 #define WINED3DDEVCAPS_FLOATTLVERTEX                 0x000000001
1456 #define WINED3DDEVCAPS_SORTINCREASINGZ               0x000000002
1457 #define WINED3DDEVCAPS_SORTDECREASINGZ               0X000000004
1458 #define WINED3DDEVCAPS_SORTEXACT                     0x000000008
1459 #define WINED3DDEVCAPS_EXECUTESYSTEMMEMORY           0x000000010
1460 #define WINED3DDEVCAPS_EXECUTEVIDEOMEMORY            0x000000020
1461 #define WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY          0x000000040
1462 #define WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY           0x000000080
1463 #define WINED3DDEVCAPS_TEXTURESYSTEMMEMORY           0x000000100
1464 #define WINED3DDEVCAPS_TEXTUREVIDEOMEMORY            0x000000200
1465 #define WINED3DDEVCAPS_DRAWPRIMTLVERTEX              0x000000400
1466 #define WINED3DDEVCAPS_CANRENDERAFTERFLIP            0x000000800
1467 #define WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM         0x000001000
1468 #define WINED3DDEVCAPS_DRAWPRIMITIVES2               0x000002000
1469 #define WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES       0x000004000
1470 #define WINED3DDEVCAPS_DRAWPRIMITIVES2EX             0x000008000
1471 #define WINED3DDEVCAPS_HWTRANSFORMANDLIGHT           0x000010000
1472 #define WINED3DDEVCAPS_CANBLTSYSTONONLOCAL           0x000020000
1473 #define WINED3DDEVCAPS_HWRASTERIZATION               0x000080000
1474 #define WINED3DDEVCAPS_PUREDEVICE                    0x000100000
1475 #define WINED3DDEVCAPS_QUINTICRTPATCHES              0x000200000
1476 #define WINED3DDEVCAPS_RTPATCHES                     0x000400000
1477 #define WINED3DDEVCAPS_RTPATCHHANDLEZERO             0x000800000
1478 #define WINED3DDEVCAPS_NPATCHES                      0x001000000
1479
1480 #define WINED3DLOCK_READONLY           0x0010
1481 #define WINED3DLOCK_NOSYSLOCK          0x0800
1482 #define WINED3DLOCK_NOOVERWRITE        0x1000
1483 #define WINED3DLOCK_DISCARD            0x2000
1484 #define WINED3DLOCK_DONOTWAIT          0x4000
1485 #define WINED3DLOCK_NO_DIRTY_UPDATE    0x8000
1486
1487 #define WINED3DPRESENT_RATE_DEFAULT                  0x000000000
1488
1489 #define WINED3DPRESENT_INTERVAL_DEFAULT              0x00000000
1490 #define WINED3DPRESENT_INTERVAL_ONE                  0x00000001
1491 #define WINED3DPRESENT_INTERVAL_TWO                  0x00000002
1492 #define WINED3DPRESENT_INTERVAL_THREE                0x00000004
1493 #define WINED3DPRESENT_INTERVAL_FOUR                 0x00000008
1494 #define WINED3DPRESENT_INTERVAL_IMMEDIATE            0x80000000
1495
1496 #define WINED3DMAXUSERCLIPPLANES       32
1497 #define WINED3DCLIPPLANE0              (1 << 0)
1498 #define WINED3DCLIPPLANE1              (1 << 1)
1499 #define WINED3DCLIPPLANE2              (1 << 2)
1500 #define WINED3DCLIPPLANE3              (1 << 3)
1501 #define WINED3DCLIPPLANE4              (1 << 4)
1502 #define WINED3DCLIPPLANE5              (1 << 5)
1503
1504 /* FVF (Flexible Vertex Format) codes */
1505 #define WINED3DFVF_RESERVED0           0x0001
1506 #define WINED3DFVF_POSITION_MASK       0x000E
1507 #define WINED3DFVF_XYZ                 0x0002
1508 #define WINED3DFVF_XYZRHW              0x0004
1509 #define WINED3DFVF_XYZB1               0x0006
1510 #define WINED3DFVF_XYZB2               0x0008
1511 #define WINED3DFVF_XYZB3               0x000a
1512 #define WINED3DFVF_XYZB4               0x000c
1513 #define WINED3DFVF_XYZB5               0x000e
1514 #define WINED3DFVF_XYZW                0x4002
1515 #define WINED3DFVF_NORMAL              0x0010
1516 #define WINED3DFVF_PSIZE               0x0020
1517 #define WINED3DFVF_DIFFUSE             0x0040
1518 #define WINED3DFVF_SPECULAR            0x0080
1519 #define WINED3DFVF_TEXCOUNT_MASK       0x0f00
1520 #define WINED3DFVF_TEXCOUNT_SHIFT           8
1521 #define WINED3DFVF_TEX0                0x0000
1522 #define WINED3DFVF_TEX1                0x0100
1523 #define WINED3DFVF_TEX2                0x0200
1524 #define WINED3DFVF_TEX3                0x0300
1525 #define WINED3DFVF_TEX4                0x0400
1526 #define WINED3DFVF_TEX5                0x0500
1527 #define WINED3DFVF_TEX6                0x0600
1528 #define WINED3DFVF_TEX7                0x0700
1529 #define WINED3DFVF_TEX8                0x0800
1530 #define WINED3DFVF_LASTBETA_UBYTE4     0x1000
1531 #define WINED3DFVF_LASTBETA_D3DCOLOR   0x8000
1532 #define WINED3DFVF_RESERVED2           0x6000
1533
1534 #define WINED3DFVF_TEXTUREFORMAT1 3
1535 #define WINED3DFVF_TEXTUREFORMAT2 0
1536 #define WINED3DFVF_TEXTUREFORMAT3 1
1537 #define WINED3DFVF_TEXTUREFORMAT4 2
1538 #define WINED3DFVF_TEXCOORDSIZE1(CoordIndex) (WINED3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
1539 #define WINED3DFVF_TEXCOORDSIZE2(CoordIndex) (WINED3DFVF_TEXTUREFORMAT2)
1540 #define WINED3DFVF_TEXCOORDSIZE3(CoordIndex) (WINED3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
1541 #define WINED3DFVF_TEXCOORDSIZE4(CoordIndex) (WINED3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
1542
1543 /* Clear flags */
1544 #define WINED3DCLEAR_TARGET   0x00000001
1545 #define WINED3DCLEAR_ZBUFFER  0x00000002
1546 #define WINED3DCLEAR_STENCIL  0x00000004
1547
1548 /* Stream source flags */
1549 #define WINED3DSTREAMSOURCE_INDEXEDDATA  (1 << 30)
1550 #define WINED3DSTREAMSOURCE_INSTANCEDATA (2 << 30)
1551
1552 #endif