source: Daodan/MinGW/include/d3d9types.h@ 1143

Last change on this file since 1143 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 32.5 KB
Line 
1/*
2
3 d3d9types.h - Header file for the Direct3D9 API
4
5 Written by Filip Navara <xnavara@volny.cz>
6
7 This library is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
11*/
12
13#ifndef _D3D9_TYPES_H
14#define _D3D9_TYPES_H
15#if __GNUC__ >=3
16#pragma GCC system_header
17#endif
18
19#ifndef DIRECT3D_VERSION
20#define DIRECT3D_VERSION 0x0900
21#endif
22
23#if (DIRECT3D_VERSION >= 0x0900)
24
25#include <pshpack4.h>
26
27#define D3DCLEAR_TARGET 0x01
28#define D3DCLEAR_ZBUFFER 0x02
29#define D3DCLEAR_STENCIL 0x04
30#define D3DCLIPPLANE0 0x01
31#define D3DCLIPPLANE1 0x02
32#define D3DCLIPPLANE2 0x04
33#define D3DCLIPPLANE3 0x08
34#define D3DCLIPPLANE4 0x10
35#define D3DCLIPPLANE5 0x20
36#define D3DCOLOR_ARGB(a,r,g,b) ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
37#define D3DCOLOR_COLORVALUE(r,g,b,a) D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f))
38#define D3DCOLOR_RGBA(r,g,b,a) D3DCOLOR_ARGB(a,r,g,b)
39#define D3DCOLOR_XRGB(r,g,b) D3DCOLOR_ARGB(0xff,r,g,b)
40#define D3DCOLOR_XYUV(y,u,v) D3DCOLOR_ARGB(0xff,y,u,v)
41#define D3DCOLOR_AYUV(a,y,u,v) D3DCOLOR_ARGB(a,y,u,v)
42#define D3DCOLORWRITEENABLE_RED 0x01
43#define D3DCOLORWRITEENABLE_GREEN 0x02
44#define D3DCOLORWRITEENABLE_BLUE 0x04
45#define D3DCOLORWRITEENABLE_ALPHA 0x08
46#define D3DCS_LEFT 0x01
47#define D3DCS_RIGHT 0x02
48#define D3DCS_TOP 0x04
49#define D3DCS_BOTTOM 0x08
50#define D3DCS_FRONT 0x10
51#define D3DCS_BACK 0x20
52#define D3DCS_PLANE0 0x40
53#define D3DCS_PLANE1 0x80
54#define D3DCS_PLANE2 0x100
55#define D3DCS_PLANE3 0x200
56#define D3DCS_PLANE4 0x400
57#define D3DCS_PLANE5 0x800
58#define D3DCS_ALL (D3DCS_LEFT|D3DCS_RIGHT|D3DCS_TOP|D3DCS_BOTTOM|D3DCS_FRONT|D3DCS_BACK|D3DCS_PLANE0|D3DCS_PLANE1|D3DCS_PLANE2|D3DCS_PLANE3|D3DCS_PLANE4|D3DCS_PLANE5)
59#define D3DDECL_END() {0xff,0,D3DDECLTYPE_UNUSED,0,0,0}
60#define D3DDP_MAXTEXCOORD 8
61#define D3DPV_DONOTCOPYDATA 0x01
62#define D3DTA_SELECTMASK 0x0f
63#define D3DTA_DIFFUSE 0x00
64#define D3DTA_CURRENT 0x01
65#define D3DTA_TEXTURE 0x02
66#define D3DTA_TFACTOR 0x03
67#define D3DTA_SPECULAR 0x04
68#define D3DTA_TEMP 0x05
69#define D3DTA_CONSTANT 0x06
70#define D3DTA_COMPLEMENT 0x10
71#define D3DTA_ALPHAREPLICATE 0x20
72#define D3DFVF_RESERVED0 0x01
73#define D3DFVF_POSITION_MASK 0x4000E
74#define D3DFVF_XYZ 0x02
75#define D3DFVF_XYZRHW 0x04
76#define D3DFVF_XYZB1 0x06
77#define D3DFVF_XYZB2 0x08
78#define D3DFVF_XYZB3 0x0a
79#define D3DFVF_XYZB4 0x0c
80#define D3DFVF_XYZB5 0x0e
81#define D3DFVF_XYZW 0x4002
82#define D3DFVF_NORMAL 0x10
83#define D3DFVF_PSIZE 0x20
84#define D3DFVF_DIFFUSE 0x40
85#define D3DFVF_SPECULAR 0x80
86#define D3DFVF_TEXCOUNT_MASK 0xf00
87#define D3DFVF_TEXCOUNT_SHIFT 8
88#define D3DFVF_TEX0 0x0000
89#define D3DFVF_TEX1 0x0100
90#define D3DFVF_TEX2 0x0200
91#define D3DFVF_TEX3 0x0300
92#define D3DFVF_TEX4 0x0400
93#define D3DFVF_TEX5 0x0500
94#define D3DFVF_TEX6 0x0600
95#define D3DFVF_TEX7 0x0700
96#define D3DFVF_TEX8 0x0800
97#define D3DFVF_TEXCOORDSIZE1(i) (D3DFVF_TEXTUREFORMAT1 << (i * 2 + 16))
98#define D3DFVF_TEXCOORDSIZE2(i) (D3DFVF_TEXTUREFORMAT2)
99#define D3DFVF_TEXCOORDSIZE3(i) (D3DFVF_TEXTUREFORMAT3 << (i * 2 + 16))
100#define D3DFVF_TEXCOORDSIZE4(i) (D3DFVF_TEXTUREFORMAT4 << (i * 2 + 16))
101#define D3DFVF_TEXTUREFORMAT1 3
102#define D3DFVF_TEXTUREFORMAT2 0
103#define D3DFVF_TEXTUREFORMAT3 1
104#define D3DFVF_TEXTUREFORMAT4 2
105#define D3DFVF_LASTBETA_UBYTE4 0x1000
106#define D3DFVF_LASTBETA_D3DCOLOR 0x8000
107#define D3DFVF_RESERVED2 0x6000
108#define D3DDMAPSAMPLER 256
109#define D3DVERTEXTEXTURESAMPLER0 (D3DDMAPSAMPLER+1)
110#define D3DVERTEXTEXTURESAMPLER1 (D3DDMAPSAMPLER+2)
111#define D3DVERTEXTEXTURESAMPLER2 (D3DDMAPSAMPLER+3)
112#define D3DVERTEXTEXTURESAMPLER3 (D3DDMAPSAMPLER+4)
113#define D3DVS_ADDRESSMODE_SHIFT 13
114#define D3DVS_ADDRESSMODE_MASK (1 << D3DVS_ADDRESSMODE_SHIFT)
115#define D3DVS_SWIZZLE_SHIFT 16
116#define D3DVS_SWIZZLE_MASK 0x00FF0000
117#define D3DVS_X_X (0 << D3DVS_SWIZZLE_SHIFT)
118#define D3DVS_X_Y (1 << D3DVS_SWIZZLE_SHIFT)
119#define D3DVS_X_Z (2 << D3DVS_SWIZZLE_SHIFT)
120#define D3DVS_X_W (3 << D3DVS_SWIZZLE_SHIFT)
121#define D3DVS_Y_X (0 << (D3DVS_SWIZZLE_SHIFT + 2))
122#define D3DVS_Y_Y (1 << (D3DVS_SWIZZLE_SHIFT + 2))
123#define D3DVS_Y_Z (2 << (D3DVS_SWIZZLE_SHIFT + 2))
124#define D3DVS_Y_W (3 << (D3DVS_SWIZZLE_SHIFT + 2))
125#define D3DVS_Z_X (0 << (D3DVS_SWIZZLE_SHIFT + 4))
126#define D3DVS_Z_Y (1 << (D3DVS_SWIZZLE_SHIFT + 4))
127#define D3DVS_Z_Z (2 << (D3DVS_SWIZZLE_SHIFT + 4))
128#define D3DVS_Z_W (3 << (D3DVS_SWIZZLE_SHIFT + 4))
129#define D3DVS_W_X (0 << (D3DVS_SWIZZLE_SHIFT + 6))
130#define D3DVS_W_Y (1 << (D3DVS_SWIZZLE_SHIFT + 6))
131#define D3DVS_W_Z (2 << (D3DVS_SWIZZLE_SHIFT + 6))
132#define D3DVS_W_W (3 << (D3DVS_SWIZZLE_SHIFT + 6))
133#define D3DVS_NOSWIZZLE (D3DVS_X_X|D3DVS_Y_Y|D3DVS_Z_Z|D3DVS_W_W)
134#define D3DPRESENT_RATE_DEFAULT 0
135#define D3DRENDERSTATE_WRAPBIAS 128UL
136#define D3DSHADER_ADDRESSMODE_SHIFT 13
137#define D3DSHADER_ADDRESSMODE_MASK (1 << D3DSHADER_ADDRESSMODE_SHIFT)
138#define D3DSHADER_COMPARISON_SHIFT D3DSP_OPCODESPECIFICCONTROL_SHIFT
139#define D3DSHADER_COMPARISON_MASK (0x07 << D3DSHADER_COMPARISON_SHIFT)
140#define D3DSHADER_INSTRUCTION_PREDICATED 0x10000000
141#define D3DSI_COISSUE 0x40000000
142#define D3DSI_COMMENTSIZE_SHIFT 16
143#define D3DSI_COMMENTSIZE_MASK 0x7fff0000
144#define D3DSI_OPCODE_MASK 0xffff
145#define D3DSI_INSTLENGTH_MASK 0xf000000
146#define D3DSI_INSTLENGTH_SHIFT 24
147#define D3DSI_TEXLD_PROJECT (0x01 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
148#define D3DSI_TEXLD_BIAS (0x02 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
149#define D3DSINCOSCONST1 -1.5500992e-006f, -2.1701389e-005f, 0.0026041667f, 0.00026041668f
150#define D3DSINCOSCONST2 -0.020833334f, -0.12500000f, 1.0f, 0.50000000f
151#define D3DSP_OPCODESPECIFICCONTROL_MASK 0xff0000
152#define D3DSP_OPCODESPECIFICCONTROL_SHIFT 16
153#define D3DSP_DCL_USAGE_SHIFT 0
154#define D3DSP_DCL_USAGE_MASK 0x0000000f
155#define D3DSP_DCL_USAGEINDEX_SHIFT 16
156#define D3DSP_DCL_USAGEINDEX_MASK 0x000f0000
157#define D3DSP_TEXTURETYPE_SHIFT 27
158#define D3DSP_TEXTURETYPE_MASK 0x78000000
159#define D3DSP_REGNUM_MASK 0x7ff
160#define D3DSP_WRITEMASK_0 0x10000
161#define D3DSP_WRITEMASK_1 0x20000
162#define D3DSP_WRITEMASK_2 0x40000
163#define D3DSP_WRITEMASK_3 0x80000
164#define D3DSP_WRITEMASK_ALL 0xf0000
165#define D3DSP_DSTMOD_SHIFT 20
166#define D3DSP_DSTMOD_MASK 0xf00000
167#define D3DSPDM_NONE 0
168#define D3DSPDM_SATURATE (1 << D3DSP_DSTMOD_SHIFT)
169#define D3DSPDM_PARTIALPRECISION (2 << D3DSP_DSTMOD_SHIFT)
170#define D3DSPDM_MSAMPCENTROID (4 << D3DSP_DSTMOD_SHIFT)
171#define D3DSP_DSTSHIFT_SHIFT 24
172#define D3DSP_DSTSHIFT_MASK 0xf000000
173#define D3DSP_NOSWIZZLE ((0 << (D3DSP_SWIZZLE_SHIFT + 0)) | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | (3 << (D3DSP_SWIZZLE_SHIFT + 6)))
174#define D3DSP_REPLICATERED 0
175#define D3DSP_REPLICATEGREEN ((1 << (D3DSP_SWIZZLE_SHIFT + 0)) | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (1 << (D3DSP_SWIZZLE_SHIFT + 4)) | (1 << (D3DSP_SWIZZLE_SHIFT + 6)))
176#define D3DSP_REPLICATEBLUE ((2 << (D3DSP_SWIZZLE_SHIFT + 0)) | (2 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | (2 << (D3DSP_SWIZZLE_SHIFT + 6)))
177#define D3DSP_REPLICATEALPHA ((3 << (D3DSP_SWIZZLE_SHIFT + 0)) | (3 << (D3DSP_SWIZZLE_SHIFT + 2)) | (3 << (D3DSP_SWIZZLE_SHIFT + 4)) | (3 << (D3DSP_SWIZZLE_SHIFT + 6)))
178#define D3DSP_REGTYPE_SHIFT 28
179#define D3DSP_REGTYPE_SHIFT2 8
180#define D3DSP_REGTYPE_MASK 0x70000000
181#define D3DSP_REGTYPE_MASK2 0x1800
182#define D3DSP_SRCMOD_SHIFT 24
183#define D3DSP_SRCMOD_MASK 0xf000000
184#define D3DSP_SWIZZLE_SHIFT 16
185#define D3DSP_SWIZZLE_MASK 0xff0000
186#define D3DTS_WORLDMATRIX(index) (D3DTRANSFORMSTATETYPE)(index + 256)
187#define D3DTS_WORLD D3DTS_WORLDMATRIX(0)
188#define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1)
189#define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2)
190#define D3DTS_WORLD3 D3DTS_WORLDMATRIX(3)
191#define D3DTSS_TCI_PASSTHRU 0x00
192#define D3DTSS_TCI_CAMERASPACENORMAL 0x10000
193#define D3DTSS_TCI_CAMERASPACEPOSITION 0x20000
194#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x30000
195#define D3DTSS_TCI_SPHEREMAP 0x40000
196#define D3DUSAGE_RENDERTARGET 0x01
197#define D3DUSAGE_DEPTHSTENCIL 0x02
198#define D3DUSAGE_WRITEONLY 0x08
199#define D3DUSAGE_SOFTWAREPROCESSING 0x10
200#define D3DUSAGE_DONOTCLIP 0x20
201#define D3DUSAGE_POINTS 0x40
202#define D3DUSAGE_RTPATCHES 0x80
203#define D3DUSAGE_NPATCHES 0x100
204#define D3DUSAGE_DYNAMIC 0x200
205#define D3DUSAGE_AUTOGENMIPMAP 0x400
206#define D3DUSAGE_DMAP 0x4000
207#define D3DUSAGE_QUERY_LEGACYBUMPMAP 0x8000
208#define D3DUSAGE_QUERY_SRGBREAD 0x10000
209#define D3DUSAGE_QUERY_FILTER 0x20000
210#define D3DUSAGE_QUERY_SRGBWRITE 0x40000
211#define D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING 0x80000
212#define D3DUSAGE_QUERY_VERTEXTEXTURE 0x100000
213#define D3DWRAP_U 0x01
214#define D3DWRAP_V 0x02
215#define D3DWRAP_W 0x04
216#define D3DWRAPCOORD_0 0x01
217#define D3DWRAPCOORD_1 0x02
218#define D3DWRAPCOORD_2 0x04
219#define D3DWRAPCOORD_3 0x08
220#define MAX_DEVICE_IDENTIFIER_STRING 512
221#define MAXD3DDECLLENGTH 64
222#define MAXD3DDECLMETHOD D3DDECLMETHOD_LOOKUPPRESAMPLED
223#define MAXD3DDECLTYPE D3DDECLTYPE_UNUSED
224#define MAXD3DDECLUSAGE D3DDECLUSAGE_SAMPLE
225#define MAXD3DDECLUSAGEINDEX 15
226#define D3DMAXUSERCLIPPLANES 32
227#define D3D_MAX_SIMULTANEOUS_RENDERTARGETS 4
228#define D3DPS_VERSION(major,minor) (0xffff0000 | ((major) << 8) | (minor))
229#define D3DVS_VERSION(major,minor) (0xfffe0000 | ((major) << 8) | (minor))
230#define D3DSHADER_VERSION_MAJOR(version) (((version) >> 8) & 0xff)
231#define D3DSHADER_VERSION_MINOR(version) (((version) >> 0) & 0xff)
232#define D3DSHADER_COMMENT(s) ((((s) << D3DSI_COMMENTSIZE_SHIFT) & D3DSI_COMMENTSIZE_MASK) | D3DSIO_COMMENT)
233#define D3DPS_END() 0xffff
234#define D3DVS_END() 0xffff
235#define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER 0x01
236#define D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL 0x02
237#define D3DPRESENTFLAG_DEVICECLIP 0x04
238#define D3DPRESENTFLAG_VIDEO 0x10
239#define D3DLOCK_READONLY 0x10
240#define D3DLOCK_NOSYSLOCK 0x800
241#define D3DLOCK_NOOVERWRITE 0x1000
242#define D3DLOCK_DISCARD 0x2000
243#define D3DLOCK_DONOTWAIT 0x4000
244#define D3DLOCK_NO_DIRTY_UPDATE 0x8000
245#define D3DISSUE_END 0x01
246#define D3DISSUE_BEGIN 0x02
247#define D3DGETDATA_FLUSH 0x01
248#define D3DRTYPECOUNT (D3DRTYPE_INDEXBUFFER+1)
249
250#define MAKEFOURCC(a,b,c,d) \
251 ((DWORD)(BYTE)(a) | ((DWORD)(BYTE)(b) << 8) | \
252 ((DWORD)(BYTE)(c) << 16) | ((DWORD)(BYTE)(d) << 24 ))
253
254typedef DWORD D3DCOLOR;
255
256typedef enum _D3DBACKBUFFER_TYPE {
257 D3DBACKBUFFER_TYPE_MONO = 0,
258 D3DBACKBUFFER_TYPE_LEFT = 1,
259 D3DBACKBUFFER_TYPE_RIGHT = 2,
260 D3DBACKBUFFER_TYPE_FORCE_DWORD = 0xffffffff
261} D3DBACKBUFFER_TYPE;
262
263typedef enum _D3DBASISTYPE {
264 D3DBASIS_BEZIER = 0,
265 D3DBASIS_BSPLINE = 1,
266 D3DBASIS_INTERPOLATE = 2,
267 D3DBASIS_FORCE_DWORD = 0xffffffff
268} D3DBASISTYPE;
269
270typedef enum _D3DBLEND {
271 D3DBLEND_ZERO = 1,
272 D3DBLEND_ONE = 2,
273 D3DBLEND_SRCCOLOR = 3,
274 D3DBLEND_INVSRCCOLOR = 4,
275 D3DBLEND_SRCALPHA = 5,
276 D3DBLEND_INVSRCALPHA = 6,
277 D3DBLEND_DESTALPHA = 7,
278 D3DBLEND_INVDESTALPHA = 8,
279 D3DBLEND_DESTCOLOR = 9,
280 D3DBLEND_INVDESTCOLOR = 10,
281 D3DBLEND_SRCALPHASAT = 11,
282 D3DBLEND_BOTHSRCALPHA = 12,
283 D3DBLEND_BOTHINVSRCALPHA = 13,
284 D3DBLEND_BLENDFACTOR = 14,
285 D3DBLEND_INVBLENDFACTOR = 15,
286 D3DBLEND_FORCE_DWORD = 0xffffffff
287} D3DBLEND;
288
289typedef enum _D3DBLENDOP {
290 D3DBLENDOP_ADD = 1,
291 D3DBLENDOP_SUBTRACT = 2,
292 D3DBLENDOP_REVSUBTRACT = 3,
293 D3DBLENDOP_MIN = 4,
294 D3DBLENDOP_MAX = 5,
295 D3DBLENDOP_FORCE_DWORD = 0x7fffffff
296} D3DBLENDOP;
297
298typedef enum _D3DCMPFUNC {
299 D3DCMP_NEVER = 1,
300 D3DCMP_LESS = 2,
301 D3DCMP_EQUAL = 3,
302 D3DCMP_LESSEQUAL = 4,
303 D3DCMP_GREATER = 5,
304 D3DCMP_NOTEQUAL = 6,
305 D3DCMP_GREATEREQUAL = 7,
306 D3DCMP_ALWAYS = 8,
307 D3DCMP_FORCE_DWORD = 0xffffffff
308} D3DCMPFUNC;
309
310typedef enum _D3DCUBEMAP_FACES {
311 D3DCUBEMAP_FACE_POSITIVE_X = 0,
312 D3DCUBEMAP_FACE_NEGATIVE_X = 1,
313 D3DCUBEMAP_FACE_POSITIVE_Y = 2,
314 D3DCUBEMAP_FACE_NEGATIVE_Y = 3,
315 D3DCUBEMAP_FACE_POSITIVE_Z = 4,
316 D3DCUBEMAP_FACE_NEGATIVE_Z = 5,
317 D3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff
318} D3DCUBEMAP_FACES;
319
320typedef enum _D3DCULL {
321 D3DCULL_NONE = 1,
322 D3DCULL_CW = 2,
323 D3DCULL_CCW = 3,
324 D3DCULL_FORCE_DWORD = 0xffffffff
325} D3DCULL;
326
327typedef enum _D3DDEBUGMONITORTOKENS {
328 D3DDMT_ENABLE = 0,
329 D3DDMT_DISABLE = 1,
330 D3DDMT_FORCE_DWORD = 0xffffffff
331} D3DDEBUGMONITORTOKENS;
332
333typedef enum _D3DDECLMETHOD
334{
335 D3DDECLMETHOD_DEFAULT = 0,
336 D3DDECLMETHOD_PARTIALU = 1,
337 D3DDECLMETHOD_PARTIALV = 2,
338 D3DDECLMETHOD_CROSSUV = 3,
339 D3DDECLMETHOD_UV = 4,
340 D3DDECLMETHOD_LOOKUP = 5,
341 D3DDECLMETHOD_LOOKUPPRESAMPLED = 6
342} D3DDECLMETHOD;
343
344typedef enum _D3DDECLTYPE
345{
346 D3DDECLTYPE_FLOAT1 = 0,
347 D3DDECLTYPE_FLOAT2 = 1,
348 D3DDECLTYPE_FLOAT3 = 2,
349 D3DDECLTYPE_FLOAT4 = 3,
350 D3DDECLTYPE_D3DCOLOR = 4,
351 D3DDECLTYPE_UBYTE4 = 5,
352 D3DDECLTYPE_SHORT2 = 6,
353 D3DDECLTYPE_SHORT4 = 7,
354 D3DDECLTYPE_UBYTE4N = 8,
355 D3DDECLTYPE_SHORT2N = 9,
356 D3DDECLTYPE_SHORT4N = 10,
357 D3DDECLTYPE_USHORT2N = 11,
358 D3DDECLTYPE_USHORT4N = 12,
359 D3DDECLTYPE_UDEC3 = 13,
360 D3DDECLTYPE_DEC3N = 14,
361 D3DDECLTYPE_FLOAT16_2 = 15,
362 D3DDECLTYPE_FLOAT16_4 = 16,
363 D3DDECLTYPE_UNUSED = 17,
364} D3DDECLTYPE;
365
366typedef enum _D3DDECLUSAGE
367{
368 D3DDECLUSAGE_POSITION = 0,
369 D3DDECLUSAGE_BLENDWEIGHT = 1,
370 D3DDECLUSAGE_BLENDINDICES = 2,
371 D3DDECLUSAGE_NORMAL = 3,
372 D3DDECLUSAGE_PSIZE = 4,
373 D3DDECLUSAGE_TEXCOORD = 5,
374 D3DDECLUSAGE_TANGENT = 6,
375 D3DDECLUSAGE_BINORMAL = 7,
376 D3DDECLUSAGE_TESSFACTOR = 8,
377 D3DDECLUSAGE_POSITIONT = 9,
378 D3DDECLUSAGE_COLOR = 10,
379 D3DDECLUSAGE_FOG = 11,
380 D3DDECLUSAGE_DEPTH = 12,
381 D3DDECLUSAGE_SAMPLE = 13
382} D3DDECLUSAGE;
383
384typedef enum _D3DDEGREETYPE {
385 D3DDEGREE_LINEAR = 1,
386 D3DDEGREE_QUADRATIC = 2,
387 D3DDEGREE_CUBIC = 3,
388 D3DDEGREE_QUINTIC = 5,
389 D3DDEGREE_FORCE_DWORD = 0xffffffff,
390} D3DDEGREETYPE;
391
392typedef enum _D3DDEVTYPE {
393 D3DDEVTYPE_HAL = 1,
394 D3DDEVTYPE_REF = 2,
395 D3DDEVTYPE_SW = 3,
396 D3DDEVTYPE_FORCE_DWORD = 0xffffffff
397} D3DDEVTYPE;
398
399typedef enum _D3DFILLMODE {
400 D3DFILL_POINT = 1,
401 D3DFILL_WIREFRAME = 2,
402 D3DFILL_SOLID = 3,
403 D3DFILL_FORCE_DWORD = 0xffffffff
404} D3DFILLMODE;
405
406typedef enum _D3DFOGMODE {
407 D3DFOG_NONE = 0,
408 D3DFOG_EXP = 1,
409 D3DFOG_EXP2 = 2,
410 D3DFOG_LINEAR = 3,
411 D3DFOG_FORCE_DWORD = 0xffffffff
412} D3DFOGMODE;
413
414typedef enum _D3DFORMAT {
415 D3DFMT_UNKNOWN = 0,
416 D3DFMT_R8G8B8 = 20,
417 D3DFMT_A8R8G8B8 = 21,
418 D3DFMT_X8R8G8B8 = 22,
419 D3DFMT_R5G6B5 = 23,
420 D3DFMT_X1R5G5B5 = 24,
421 D3DFMT_A1R5G5B5 = 25,
422 D3DFMT_A4R4G4B4 = 26,
423 D3DFMT_R3G3B2 = 27,
424 D3DFMT_A8 = 28,
425 D3DFMT_A8R3G3B2 = 29,
426 D3DFMT_X4R4G4B4 = 30,
427 D3DFMT_A2B10G10R10 = 31,
428 D3DFMT_A8B8G8R8 = 32,
429 D3DFMT_X8B8G8R8 = 33,
430 D3DFMT_G16R16 = 34,
431 D3DFMT_A2R10G10B10 = 35,
432 D3DFMT_A16B16G16R16 = 36,
433 D3DFMT_A8P8 = 40,
434 D3DFMT_P8 = 41,
435 D3DFMT_L8 = 50,
436 D3DFMT_A8L8 = 51,
437 D3DFMT_A4L4 = 52,
438 D3DFMT_V8U8 = 60,
439 D3DFMT_L6V5U5 = 61,
440 D3DFMT_X8L8V8U8 = 62,
441 D3DFMT_Q8W8V8U8 = 63,
442 D3DFMT_V16U16 = 64,
443 D3DFMT_A2W10V10U10 = 67,
444 D3DFMT_UYVY = MAKEFOURCC('U','Y','V','Y'),
445 D3DFMT_R8G8_B8G8 = MAKEFOURCC('R','G','B','G'),
446 D3DFMT_YUY2 = MAKEFOURCC('Y','U','Y','2'),
447 D3DFMT_G8R8_G8B8 = MAKEFOURCC('G','R','G','B'),
448 D3DFMT_DXT1 = MAKEFOURCC('D','X','T','1'),
449 D3DFMT_DXT2 = MAKEFOURCC('D','X','T','2'),
450 D3DFMT_DXT3 = MAKEFOURCC('D','X','T','3'),
451 D3DFMT_DXT4 = MAKEFOURCC('D','X','T','4'),
452 D3DFMT_DXT5 = MAKEFOURCC('D','X','T','5'),
453 D3DFMT_D16_LOCKABLE = 70,
454 D3DFMT_D32 = 71,
455 D3DFMT_D15S1 = 73,
456 D3DFMT_D24S8 = 75,
457 D3DFMT_D24X8 = 77,
458 D3DFMT_D24X4S4 = 79,
459 D3DFMT_D16 = 80,
460 D3DFMT_L16 = 81,
461 D3DFMT_D32F_LOCKABLE = 82,
462 D3DFMT_D24FS8 = 83,
463 D3DFMT_VERTEXDATA = 100,
464 D3DFMT_INDEX16 = 101,
465 D3DFMT_INDEX32 = 102,
466 D3DFMT_Q16W16V16U16 = 110,
467 D3DFMT_MULTI2_ARGB8 = MAKEFOURCC('M','E','T','1'),
468 D3DFMT_R16F = 111,
469 D3DFMT_G16R16F = 112,
470 D3DFMT_A16B16G16R16F = 113,
471 D3DFMT_R32F = 114,
472 D3DFMT_G32R32F = 115,
473 D3DFMT_A32B32G32R32F = 116,
474 D3DFMT_CxV8U8 = 117,
475 D3DFMT_FORCE_DWORD = 0xffffffff
476} D3DFORMAT;
477
478typedef enum _D3DLIGHTTYPE {
479 D3DLIGHT_POINT = 1,
480 D3DLIGHT_SPOT = 2,
481 D3DLIGHT_DIRECTIONAL = 3,
482 D3DLIGHT_FORCE_DWORD = 0xffffffff
483} D3DLIGHTTYPE;
484
485typedef enum _D3DMATERIALCOLORSOURCE
486{
487 D3DMCS_MATERIAL = 0,
488 D3DMCS_COLOR1 = 1,
489 D3DMCS_COLOR2 = 2,
490 D3DMCS_FORCE_DWORD = 0xffffffff
491} D3DMATERIALCOLORSOURCE;
492
493typedef enum _D3DMULTISAMPLE_TYPE {
494 D3DMULTISAMPLE_NONE = 0,
495 D3DMULTISAMPLE_NONMASKABLE = 1,
496 D3DMULTISAMPLE_2_SAMPLES = 2,
497 D3DMULTISAMPLE_3_SAMPLES = 3,
498 D3DMULTISAMPLE_4_SAMPLES = 4,
499 D3DMULTISAMPLE_5_SAMPLES = 5,
500 D3DMULTISAMPLE_6_SAMPLES = 6,
501 D3DMULTISAMPLE_7_SAMPLES = 7,
502 D3DMULTISAMPLE_8_SAMPLES = 8,
503 D3DMULTISAMPLE_9_SAMPLES = 9,
504 D3DMULTISAMPLE_10_SAMPLES = 10,
505 D3DMULTISAMPLE_11_SAMPLES = 11,
506 D3DMULTISAMPLE_12_SAMPLES = 12,
507 D3DMULTISAMPLE_13_SAMPLES = 13,
508 D3DMULTISAMPLE_14_SAMPLES = 14,
509 D3DMULTISAMPLE_15_SAMPLES = 15,
510 D3DMULTISAMPLE_16_SAMPLES = 16,
511 D3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
512} D3DMULTISAMPLE_TYPE;
513
514typedef enum _D3DORDERTYPE {
515 D3DORDER_LINEAR = 1,
516 D3DORDER_QUADRATIC = 2,
517 D3DORDER_CUBIC = 3,
518 D3DORDER_QUINTIC = 5,
519 D3DORDER_FORCE_DWORD = 0xffffffff
520} D3DORDERTYPE;
521
522typedef enum _D3DPATCHEDGESTYLE
523{
524 D3DPATCHEDGE_DISCRETE = 0,
525 D3DPATCHEDGE_CONTINUOUS = 1,
526 D3DPATCHEDGE_FORCE_DWORD = 0xffffffff
527} D3DPATCHEDGESTYLE;
528
529typedef enum _D3DPOOL {
530 D3DPOOL_DEFAULT = 0,
531 D3DPOOL_MANAGED = 1,
532 D3DPOOL_SYSTEMMEM = 2,
533 D3DPOOL_SCRATCH = 3,
534 D3DPOOL_FORCE_DWORD = 0xffffffff
535} D3DPOOL;
536
537typedef enum _D3DPRIMITIVETYPE {
538 D3DPT_POINTLIST = 1,
539 D3DPT_LINELIST = 2,
540 D3DPT_LINESTRIP = 3,
541 D3DPT_TRIANGLELIST = 4,
542 D3DPT_TRIANGLESTRIP = 5,
543 D3DPT_TRIANGLEFAN = 6,
544 D3DPT_FORCE_DWORD = 0xffffffff
545} D3DPRIMITIVETYPE;
546
547typedef enum _D3DQUERYTYPE {
548 D3DQUERYTYPE_VCACHE = 4,
549 D3DQUERYTYPE_RESOURCEMANAGER = 5,
550 D3DQUERYTYPE_VERTEXSTATS = 6,
551 D3DQUERYTYPE_EVENT = 8,
552 D3DQUERYTYPE_OCCLUSION = 9
553} D3DQUERYTYPE;
554
555typedef enum _D3DRENDERSTATETYPE {
556 D3DRS_ZENABLE = 7,
557 D3DRS_FILLMODE = 8,
558 D3DRS_SHADEMODE = 9,
559 D3DRS_ZWRITEENABLE = 14,
560 D3DRS_ALPHATESTENABLE = 15,
561 D3DRS_LASTPIXEL = 16,
562 D3DRS_SRCBLEND = 19,
563 D3DRS_DESTBLEND = 20,
564 D3DRS_CULLMODE = 22,
565 D3DRS_ZFUNC = 23,
566 D3DRS_ALPHAREF = 24,
567 D3DRS_ALPHAFUNC = 25,
568 D3DRS_DITHERENABLE = 26,
569 D3DRS_ALPHABLENDENABLE = 27,
570 D3DRS_FOGENABLE = 28,
571 D3DRS_SPECULARENABLE = 29,
572 D3DRS_FOGCOLOR = 34,
573 D3DRS_FOGTABLEMODE = 35,
574 D3DRS_FOGSTART = 36,
575 D3DRS_FOGEND = 37,
576 D3DRS_FOGDENSITY = 38,
577 D3DRS_RANGEFOGENABLE = 48,
578 D3DRS_STENCILENABLE = 52,
579 D3DRS_STENCILFAIL = 53,
580 D3DRS_STENCILZFAIL = 54,
581 D3DRS_STENCILPASS = 55,
582 D3DRS_STENCILFUNC = 56,
583 D3DRS_STENCILREF = 57,
584 D3DRS_STENCILMASK = 58,
585 D3DRS_STENCILWRITEMASK = 59,
586 D3DRS_TEXTUREFACTOR = 60,
587 D3DRS_WRAP0 = 128,
588 D3DRS_WRAP1 = 129,
589 D3DRS_WRAP2 = 130,
590 D3DRS_WRAP3 = 131,
591 D3DRS_WRAP4 = 132,
592 D3DRS_WRAP5 = 133,
593 D3DRS_WRAP6 = 134,
594 D3DRS_WRAP7 = 135,
595 D3DRS_CLIPPING = 136,
596 D3DRS_LIGHTING = 137,
597 D3DRS_AMBIENT = 139,
598 D3DRS_FOGVERTEXMODE = 140,
599 D3DRS_COLORVERTEX = 141,
600 D3DRS_LOCALVIEWER = 142,
601 D3DRS_NORMALIZENORMALS = 143,
602 D3DRS_DIFFUSEMATERIALSOURCE = 145,
603 D3DRS_SPECULARMATERIALSOURCE = 146,
604 D3DRS_AMBIENTMATERIALSOURCE = 147,
605 D3DRS_EMISSIVEMATERIALSOURCE = 148,
606 D3DRS_VERTEXBLEND = 151,
607 D3DRS_CLIPPLANEENABLE = 152,
608 D3DRS_POINTSIZE = 154,
609 D3DRS_POINTSIZE_MIN = 155,
610 D3DRS_POINTSPRITEENABLE = 156,
611 D3DRS_POINTSCALEENABLE = 157,
612 D3DRS_POINTSCALE_A = 158,
613 D3DRS_POINTSCALE_B = 159,
614 D3DRS_POINTSCALE_C = 160,
615 D3DRS_MULTISAMPLEANTIALIAS = 161,
616 D3DRS_MULTISAMPLEMASK = 162,
617 D3DRS_PATCHEDGESTYLE = 163,
618 D3DRS_DEBUGMONITORTOKEN = 165,
619 D3DRS_POINTSIZE_MAX = 166,
620 D3DRS_INDEXEDVERTEXBLENDENABLE = 167,
621 D3DRS_COLORWRITEENABLE = 168,
622 D3DRS_TWEENFACTOR = 170,
623 D3DRS_BLENDOP = 171,
624 D3DRS_POSITIONDEGREE = 172,
625 D3DRS_NORMALDEGREE = 173,
626 D3DRS_SCISSORTESTENABLE = 174,
627 D3DRS_SLOPESCALEDEPTHBIAS = 175,
628 D3DRS_ANTIALIASEDLINEENABLE = 176,
629 D3DRS_MINTESSELLATIONLEVEL = 178,
630 D3DRS_MAXTESSELLATIONLEVEL = 179,
631 D3DRS_ADAPTIVETESS_X = 180,
632 D3DRS_ADAPTIVETESS_Y = 181,
633 D3DRS_ADAPTIVETESS_Z = 182,
634 D3DRS_ADAPTIVETESS_W = 183,
635 D3DRS_ENABLEADAPTIVETESSELLATION = 184,
636 D3DRS_TWOSIDEDSTENCILMODE = 185,
637 D3DRS_CCW_STENCILFAIL = 186,
638 D3DRS_CCW_STENCILZFAIL = 187,
639 D3DRS_CCW_STENCILPASS = 188,
640 D3DRS_CCW_STENCILFUNC = 189,
641 D3DRS_COLORWRITEENABLE1 = 190,
642 D3DRS_COLORWRITEENABLE2 = 191,
643 D3DRS_COLORWRITEENABLE3 = 192,
644 D3DRS_BLENDFACTOR = 193,
645 D3DRS_SRGBWRITEENABLE = 194,
646 D3DRS_DEPTHBIAS = 195,
647 D3DRS_WRAP8 = 198,
648 D3DRS_WRAP9 = 199,
649 D3DRS_WRAP10 = 200,
650 D3DRS_WRAP11 = 201,
651 D3DRS_WRAP12 = 202,
652 D3DRS_WRAP13 = 203,
653 D3DRS_WRAP14 = 204,
654 D3DRS_WRAP15 = 205,
655 D3DRS_SEPARATEALPHABLENDENABLE = 206,
656 D3DRS_SRCBLENDALPHA = 207,
657 D3DRS_DESTBLENDALPHA = 208,
658 D3DRS_BLENDOPALPHA = 209,
659 D3DRS_FORCE_DWORD = 0xffffffff
660} D3DRENDERSTATETYPE;
661
662typedef enum _D3DRESOURCETYPE {
663 D3DRTYPE_SURFACE = 1,
664 D3DRTYPE_VOLUME = 2,
665 D3DRTYPE_TEXTURE = 3,
666 D3DRTYPE_VOLUMETEXTURE = 4,
667 D3DRTYPE_CUBETEXTURE = 5,
668 D3DRTYPE_VERTEXBUFFER = 6,
669 D3DRTYPE_INDEXBUFFER = 7,
670 D3DRTYPE_FORCE_DWORD = 0xffffffff
671} D3DRESOURCETYPE;
672
673typedef enum _D3DSAMPLER_TEXTURE_TYPE
674{
675 D3DSTT_UNKNOWN = 0 << D3DSP_TEXTURETYPE_SHIFT,
676 D3DSTT_2D = 2 << D3DSP_TEXTURETYPE_SHIFT,
677 D3DSTT_CUBE = 3 << D3DSP_TEXTURETYPE_SHIFT,
678 D3DSTT_VOLUME = 4 << D3DSP_TEXTURETYPE_SHIFT,
679 D3DSTT_FORCE_DWORD = 0xffffffff
680} D3DSAMPLER_TEXTURE_TYPE;
681
682typedef enum _D3DSAMPLERSTATETYPE {
683 D3DSAMP_ADDRESSU = 1,
684 D3DSAMP_ADDRESSV = 2,
685 D3DSAMP_ADDRESSW = 3,
686 D3DSAMP_BORDERCOLOR = 4,
687 D3DSAMP_MAGFILTER = 5,
688 D3DSAMP_MINFILTER = 6,
689 D3DSAMP_MIPFILTER = 7,
690 D3DSAMP_MIPMAPLODBIAS = 8,
691 D3DSAMP_MAXMIPLEVEL = 9,
692 D3DSAMP_MAXANISOTROPY = 10,
693 D3DSAMP_SRGBTEXTURE = 11,
694 D3DSAMP_ELEMENTINDEX = 12,
695 D3DSAMP_DMAPOFFSET = 13,
696 D3DSAMP_FORCE_DWORD = 0xffffffff,
697} D3DSAMPLERSTATETYPE;
698
699typedef enum _D3DSHADEMODE {
700 D3DSHADE_FLAT = 1,
701 D3DSHADE_GOURAUD = 2,
702 D3DSHADE_PHONG = 3,
703 D3DSHADE_FORCE_DWORD = 0xffffffff
704} D3DSHADEMODE;
705
706typedef enum _D3DSHADER_ADDRESSMODE_TYPE
707{
708 D3DSHADER_ADDRMODE_ABSOLUTE = (0 << D3DSHADER_ADDRESSMODE_SHIFT),
709 D3DSHADER_ADDRMODE_RELATIVE = (1 << D3DSHADER_ADDRESSMODE_SHIFT),
710 D3DSHADER_ADDRMODE_FORCE_DWORD = 0xffffffff
711} D3DSHADER_ADDRESSMODE_TYPE;
712
713typedef enum _D3DSHADER_COMPARISON
714{
715 D3DSPC_RESERVED0 = 0,
716 D3DSPC_GT = 1,
717 D3DSPC_EQ = 2,
718 D3DSPC_GE = 3,
719 D3DSPC_LT = 4,
720 D3DSPC_NE = 5,
721 D3DSPC_LE = 6,
722 D3DSPC_RESERVED1 = 7
723} D3DSHADER_COMPARISON;
724
725typedef enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE
726{
727 D3DSIO_NOP = 0,
728 D3DSIO_MOV = 1,
729 D3DSIO_ADD = 2,
730 D3DSIO_SUB = 3,
731 D3DSIO_MAD = 4,
732 D3DSIO_MUL = 5,
733 D3DSIO_RCP = 6,
734 D3DSIO_RSQ = 7,
735 D3DSIO_DP3 = 8,
736 D3DSIO_DP4 = 9,
737 D3DSIO_MIN = 10,
738 D3DSIO_MAX = 11,
739 D3DSIO_SLT = 12,
740 D3DSIO_SGE = 13,
741 D3DSIO_EXP = 14,
742 D3DSIO_LOG = 15,
743 D3DSIO_LIT = 16,
744 D3DSIO_DST = 17,
745 D3DSIO_LRP = 18,
746 D3DSIO_FRC = 19,
747 D3DSIO_M4x4 = 20,
748 D3DSIO_M4x3 = 21,
749 D3DSIO_M3x4 = 22,
750 D3DSIO_M3x3 = 23,
751 D3DSIO_M3x2 = 24,
752 D3DSIO_CALL = 25,
753 D3DSIO_CALLNZ = 26,
754 D3DSIO_LOOP = 27,
755 D3DSIO_RET = 28,
756 D3DSIO_ENDLOOP = 29,
757 D3DSIO_LABEL = 30,
758 D3DSIO_DCL = 31,
759 D3DSIO_POW = 32,
760 D3DSIO_CRS = 33,
761 D3DSIO_SGN = 34,
762 D3DSIO_ABS = 35,
763 D3DSIO_NRM = 36,
764 D3DSIO_SINCOS = 37,
765 D3DSIO_REP = 38,
766 D3DSIO_ENDREP = 39,
767 D3DSIO_IF = 40,
768 D3DSIO_IFC = 41,
769 D3DSIO_ELSE = 42,
770 D3DSIO_ENDIF = 43,
771 D3DSIO_BREAK = 44,
772 D3DSIO_BREAKC = 45,
773 D3DSIO_MOVA = 46,
774 D3DSIO_DEFB = 47,
775 D3DSIO_DEFI = 48,
776 D3DSIO_TEXCOORD = 64,
777 D3DSIO_TEXKILL = 65,
778 D3DSIO_TEX = 66,
779 D3DSIO_TEXBEM = 67,
780 D3DSIO_TEXBEML = 68,
781 D3DSIO_TEXREG2AR = 69,
782 D3DSIO_TEXREG2GB = 70,
783 D3DSIO_TEXM3x2PAD = 71,
784 D3DSIO_TEXM3x2TEX = 72,
785 D3DSIO_TEXM3x3PAD = 73,
786 D3DSIO_TEXM3x3TEX = 74,
787 D3DSIO_RESERVED0 = 75,
788 D3DSIO_TEXM3x3SPEC = 76,
789 D3DSIO_TEXM3x3VSPEC = 77,
790 D3DSIO_EXPP = 78,
791 D3DSIO_LOGP = 79,
792 D3DSIO_CND = 80,
793 D3DSIO_DEF = 81,
794 D3DSIO_TEXREG2RGB = 82,
795 D3DSIO_TEXDP3TEX = 83,
796 D3DSIO_TEXM3x2DEPTH = 84,
797 D3DSIO_TEXDP3 = 85,
798 D3DSIO_TEXM3x3 = 86,
799 D3DSIO_TEXDEPTH = 87,
800 D3DSIO_CMP = 88,
801 D3DSIO_BEM = 89,
802 D3DSIO_DP2ADD = 90,
803 D3DSIO_DSX = 91,
804 D3DSIO_DSY = 92,
805 D3DSIO_TEXLDD = 93,
806 D3DSIO_SETP = 94,
807 D3DSIO_TEXLDL = 95,
808 D3DSIO_BREAKP = 96,
809 D3DSIO_PHASE = 0xfffd,
810 D3DSIO_COMMENT = 0xfffe,
811 D3DSIO_END = 0xffff,
812 D3DSIO_FORCE_DWORD = 0xffffffff
813} D3DSHADER_INSTRUCTION_OPCODE_TYPE;
814
815typedef enum _D3DSHADER_MISCTYPE_OFFSETS
816{
817 D3DSMO_POSITION = 0,
818 D3DSMO_FACE = 1
819} D3DSHADER_MISCTYPE_OFFSETS;
820
821typedef enum _D3DSHADER_PARAM_REGISTER_TYPE
822{
823 D3DSPR_TEMP = 0,
824 D3DSPR_INPUT = 1,
825 D3DSPR_CONST = 2,
826 D3DSPR_ADDR = 3,
827 D3DSPR_TEXTURE = 3,
828 D3DSPR_RASTOUT = 4,
829 D3DSPR_ATTROUT = 5,
830 D3DSPR_TEXCRDOUT = 6,
831 D3DSPR_OUTPUT = 6,
832 D3DSPR_CONSTINT = 7,
833 D3DSPR_COLOROUT = 8,
834 D3DSPR_DEPTHOUT = 9,
835 D3DSPR_SAMPLER = 10,
836 D3DSPR_CONST2 = 11,
837 D3DSPR_CONST3 = 12,
838 D3DSPR_CONST4 = 13,
839 D3DSPR_CONSTBOOL = 14,
840 D3DSPR_LOOP = 15,
841 D3DSPR_TEMPFLOAT16 = 16,
842 D3DSPR_MISCTYPE = 17,
843 D3DSPR_LABEL = 18,
844 D3DSPR_PREDICATE = 19,
845 D3DSPR_FORCE_DWORD = 0xffffffff
846} D3DSHADER_PARAM_REGISTER_TYPE;
847
848typedef enum _D3DSHADER_PARAM_SRCMOD_TYPE
849{
850 D3DSPSM_NONE = 0 << D3DSP_SRCMOD_SHIFT,
851 D3DSPSM_NEG = 1 << D3DSP_SRCMOD_SHIFT,
852 D3DSPSM_BIAS = 2 << D3DSP_SRCMOD_SHIFT,
853 D3DSPSM_BIASNEG = 3 << D3DSP_SRCMOD_SHIFT,
854 D3DSPSM_SIGN = 4 << D3DSP_SRCMOD_SHIFT,
855 D3DSPSM_SIGNNEG = 5 << D3DSP_SRCMOD_SHIFT,
856 D3DSPSM_COMP = 6 << D3DSP_SRCMOD_SHIFT,
857 D3DSPSM_X2 = 7 << D3DSP_SRCMOD_SHIFT,
858 D3DSPSM_X2NEG = 8 << D3DSP_SRCMOD_SHIFT,
859 D3DSPSM_DZ = 9 << D3DSP_SRCMOD_SHIFT,
860 D3DSPSM_DW = 10 << D3DSP_SRCMOD_SHIFT,
861 D3DSPSM_ABS = 11 << D3DSP_SRCMOD_SHIFT,
862 D3DSPSM_ABSNEG = 12 << D3DSP_SRCMOD_SHIFT,
863 D3DSPSM_NOT = 13 << D3DSP_SRCMOD_SHIFT,
864 D3DSPSM_FORCE_DWORD = 0xffffffff
865} D3DSHADER_PARAM_SRCMOD_TYPE;
866
867typedef enum _D3DVS_ADDRESSMODE_TYPE
868{
869 D3DVS_ADDRMODE_ABSOLUTE = (0 << D3DVS_ADDRESSMODE_SHIFT),
870 D3DVS_ADDRMODE_RELATIVE = (1 << D3DVS_ADDRESSMODE_SHIFT),
871 D3DVS_ADDRMODE_FORCE_DWORD = 0xffffffff
872} D3DVS_ADDRESSMODE_TYPE;
873
874typedef enum _D3DVS_RASTOUT_OFFSETS
875{
876 D3DSRO_POSITION = 0,
877 D3DSRO_FOG = 1,
878 D3DSRO_POINT_SIZE = 2,
879 D3DSRO_FORCE_DWORD = 0xffffffff
880} D3DVS_RASTOUT_OFFSETS;
881
882typedef enum _D3DSTENCILOP {
883 D3DSTENCILOP_KEEP = 1,
884 D3DSTENCILOP_ZERO = 2,
885 D3DSTENCILOP_REPLACE = 3,
886 D3DSTENCILOP_INCRSAT = 4,
887 D3DSTENCILOP_DECRSAT = 5,
888 D3DSTENCILOP_INVERT = 6,
889 D3DSTENCILOP_INCR = 7,
890 D3DSTENCILOP_DECR = 8,
891 D3DSTENCILOP_FORCE_DWORD = 0x7fffffff
892} D3DSTENCILOP;
893
894typedef enum _D3DSTATEBLOCKTYPE {
895 D3DSBT_ALL = 1,
896 D3DSBT_PIXELSTATE = 2,
897 D3DSBT_VERTEXSTATE = 3,
898 D3DSBT_FORCE_DWORD = 0xffffffff
899} D3DSTATEBLOCKTYPE;
900
901typedef enum _D3DSWAPEFFECT {
902 D3DSWAPEFFECT_DISCARD = 1,
903 D3DSWAPEFFECT_FLIP = 2,
904 D3DSWAPEFFECT_COPY = 3,
905 D3DSWAPEFFECT_COPY_VSYNC = 4,
906 D3DSWAPEFFECT_FORCE_DWORD = 0xffffffff
907} D3DSWAPEFFECT;
908
909typedef enum _D3DTEXTUREADDRESS {
910 D3DTADDRESS_WRAP = 1,
911 D3DTADDRESS_MIRROR = 2,
912 D3DTADDRESS_CLAMP = 3,
913 D3DTADDRESS_BORDER = 4,
914 D3DTADDRESS_MIRRORONCE = 5,
915 D3DTADDRESS_FORCE_DWORD = 0xffffffff
916} D3DTEXTUREADDRESS;
917
918typedef enum _D3DTEXTUREFILTERTYPE {
919 D3DTEXF_NONE = 0,
920 D3DTEXF_POINT = 1,
921 D3DTEXF_LINEAR = 2,
922 D3DTEXF_ANISOTROPIC = 3,
923 D3DTEXF_PYRAMIDALQUAD = 6,
924 D3DTEXF_GAUSSIANQUAD = 7,
925 D3DTEXF_FORCE_DWORD = 0xffffffff
926} D3DTEXTUREFILTERTYPE;
927
928typedef enum _D3DTEXTURESTAGESTATETYPE {
929 D3DTSS_COLOROP = 1,
930 D3DTSS_COLORARG1 = 2,
931 D3DTSS_COLORARG2 = 3,
932 D3DTSS_ALPHAOP = 4,
933 D3DTSS_ALPHAARG1 = 5,
934 D3DTSS_ALPHAARG2 = 6,
935 D3DTSS_BUMPENVMAT00 = 7,
936 D3DTSS_BUMPENVMAT01 = 8,
937 D3DTSS_BUMPENVMAT10 = 9,
938 D3DTSS_BUMPENVMAT11 = 10,
939 D3DTSS_TEXCOORDINDEX = 11,
940 D3DTSS_BUMPENVLSCALE = 22,
941 D3DTSS_BUMPENVLOFFSET = 23,
942 D3DTSS_TEXTURETRANSFORMFLAGS = 24,
943 D3DTSS_ADDRESSW = 25,
944 D3DTSS_COLORARG0 = 26,
945 D3DTSS_ALPHAARG0 = 27,
946 D3DTSS_RESULTARG = 28,
947 D3DTSS_CONSTANT = 32,
948 D3DTSS_FORCE_DWORD = 0xffffffff
949} D3DTEXTURESTAGESTATETYPE;
950
951typedef enum _D3DTEXTUREOP {
952 D3DTOP_DISABLE = 1,
953 D3DTOP_SELECTARG1 = 2,
954 D3DTOP_SELECTARG2 = 3,
955 D3DTOP_MODULATE = 4,
956 D3DTOP_MODULATE2X = 5,
957 D3DTOP_MODULATE4X = 6,
958 D3DTOP_ADD = 7,
959 D3DTOP_ADDSIGNED = 8,
960 D3DTOP_ADDSIGNED2X = 9,
961 D3DTOP_SUBTRACT = 10,
962 D3DTOP_ADDSMOOTH = 11,
963 D3DTOP_BLENDDIFFUSEALPHA = 12,
964 D3DTOP_BLENDTEXTUREALPHA = 13,
965 D3DTOP_BLENDFACTORALPHA = 14,
966 D3DTOP_BLENDTEXTUREALPHAPM = 15,
967 D3DTOP_BLENDCURRENTALPHA = 16,
968 D3DTOP_PREMODULATE = 17,
969 D3DTOP_MODULATEALPHA_ADDCOLOR = 18,
970 D3DTOP_MODULATECOLOR_ADDALPHA = 19,
971 D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
972 D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
973 D3DTOP_BUMPENVMAP = 22,
974 D3DTOP_BUMPENVMAPLUMINANCE = 23,
975 D3DTOP_DOTPRODUCT3 = 24,
976 D3DTOP_MULTIPLYADD = 25,
977 D3DTOP_LERP = 26,
978 D3DTOP_FORCE_DWORD = 0xffffffff,
979} D3DTEXTUREOP;
980
981typedef enum _D3DTEXTURETRANSFORMFLAGS {
982 D3DTTFF_DISABLE = 0,
983 D3DTTFF_COUNT1 = 1,
984 D3DTTFF_COUNT2 = 2,
985 D3DTTFF_COUNT3 = 3,
986 D3DTTFF_COUNT4 = 4,
987 D3DTTFF_PROJECTED = 256,
988 D3DTTFF_FORCE_DWORD = 0xffffffff,
989} D3DTEXTURETRANSFORMFLAGS;
990
991typedef enum _D3DTRANSFORMSTATETYPE {
992 D3DTS_VIEW = 2,
993 D3DTS_PROJECTION = 3,
994 D3DTS_TEXTURE0 = 16,
995 D3DTS_TEXTURE1 = 17,
996 D3DTS_TEXTURE2 = 18,
997 D3DTS_TEXTURE3 = 19,
998 D3DTS_TEXTURE4 = 20,
999 D3DTS_TEXTURE5 = 21,
1000 D3DTS_TEXTURE6 = 22,
1001 D3DTS_TEXTURE7 = 23,
1002 D3DTS_FORCE_DWORD = 0xffffffff
1003} D3DTRANSFORMSTATETYPE;
1004
1005typedef enum _D3DVERTEXBLENDFLAGS
1006{
1007 D3DVBF_DISABLE = 0,
1008 D3DVBF_1WEIGHTS = 1,
1009 D3DVBF_2WEIGHTS = 2,
1010 D3DVBF_3WEIGHTS = 3,
1011 D3DVBF_TWEENING = 255,
1012 D3DVBF_0WEIGHTS = 256,
1013 D3DVBF_FORCE_DWORD = 0xffffffff
1014} D3DVERTEXBLENDFLAGS;
1015
1016typedef enum _D3DZBUFFERTYPE {
1017 D3DZB_FALSE = 0,
1018 D3DZB_TRUE = 1,
1019 D3DZB_USEW = 2,
1020 D3DZB_FORCE_DWORD = 0xffffffff
1021} D3DZBUFFERTYPE;
1022
1023typedef struct _D3DADAPTER_IDENTIFIER9 {
1024 char Driver[MAX_DEVICE_IDENTIFIER_STRING];
1025 char Description[MAX_DEVICE_IDENTIFIER_STRING];
1026 char DeviceName[32];
1027 LARGE_INTEGER DriverVersion;
1028 DWORD VendorId;
1029 DWORD DeviceId;
1030 DWORD SubSysId;
1031 DWORD Revision;
1032 GUID DeviceIdentifier;
1033 DWORD WHQLLevel;
1034} D3DADAPTER_IDENTIFIER9;
1035
1036typedef struct _D3DBOX {
1037 UINT Left;
1038 UINT Top;
1039 UINT Right;
1040 UINT Bottom;
1041 UINT Front;
1042 UINT Back;
1043} D3DBOX;
1044
1045typedef struct _D3DCLIPSTATUS9 {
1046 DWORD ClipUnion;
1047 DWORD ClipIntersection;
1048} D3DCLIPSTATUS9;
1049
1050typedef struct _D3DCOLORVALUE {
1051 float r;
1052 float g;
1053 float b;
1054 float a;
1055} D3DCOLORVALUE;
1056
1057typedef struct _D3DRESOURCESTATS
1058{
1059 BOOL bThrashing;
1060 DWORD ApproxBytesDownloaded;
1061 DWORD NumEvicts;
1062 DWORD NumVidCreates;
1063 DWORD LastPri;
1064 DWORD NumUsed;
1065 DWORD NumUsedInVidMem;
1066 DWORD WorkingSet;
1067 DWORD WorkingSetBytes;
1068 DWORD TotalManaged;
1069 DWORD TotalBytes;
1070} D3DRESOURCESTATS;
1071
1072typedef struct _D3DDEVICE_CREATION_PARAMETERS {
1073 UINT AdapterOrdinal;
1074 D3DDEVTYPE DeviceType;
1075 HWND hFocusWindow;
1076 DWORD BehaviorFlags;
1077} D3DDEVICE_CREATION_PARAMETERS;
1078
1079typedef struct _D3DDEVINFO_RESOURCEMANAGER {
1080 D3DRESOURCESTATS stats[D3DRTYPECOUNT];
1081} D3DDEVINFO_RESOURCEMANAGER, *LPD3DDEVINFO_RESOURCEMANAGER;
1082
1083typedef struct _D3DDEVINFO_D3DVERTEXSTATS {
1084 DWORD NumRenderedTriangles;
1085 DWORD NumExtraClippingTriangles;
1086} D3DDEVINFO_D3DVERTEXSTATS, *LPD3DDEVINFO_D3DVERTEXSTATS;
1087
1088typedef struct _D3DDEVINFO_VCACHE {
1089 DWORD Pattern;
1090 DWORD OptMethod;
1091 DWORD CacheSize;
1092 DWORD MagicNumber;
1093} D3DDEVINFO_VCACHE, *LPD3DDEVINFO_VCACHE;
1094
1095typedef struct _D3DDISPLAYMODE {
1096 UINT Width;
1097 UINT Height;
1098 UINT RefreshRate;
1099 D3DFORMAT Format;
1100} D3DDISPLAYMODE;
1101
1102typedef struct _D3DGAMMARAMP {
1103 WORD red[256];
1104 WORD green[256];
1105 WORD blue[256];
1106} D3DGAMMARAMP;
1107
1108typedef struct _D3DINDEXBUFFER_DESC {
1109 D3DFORMAT Format;
1110 D3DRESOURCETYPE Type;
1111 DWORD Usage;
1112 D3DPOOL Pool;
1113 UINT Size;
1114} D3DINDEXBUFFER_DESC;
1115
1116typedef struct _D3DVECTOR {
1117 float x;
1118 float y;
1119 float z;
1120} D3DVECTOR;
1121
1122typedef struct _D3DLIGHT9 {
1123 D3DLIGHTTYPE Type;
1124 D3DCOLORVALUE Diffuse;
1125 D3DCOLORVALUE Specular;
1126 D3DCOLORVALUE Ambient;
1127 D3DVECTOR Position;
1128 D3DVECTOR Direction;
1129 float Range;
1130 float Falloff;
1131 float Attenuation0;
1132 float Attenuation1;
1133 float Attenuation2;
1134 float Theta;
1135 float Phi;
1136} D3DLIGHT9;
1137
1138typedef struct _D3DLOCKED_BOX {
1139 INT RowPitch;
1140 INT SlicePitch;
1141 void *pBits;
1142} D3DLOCKED_BOX;
1143
1144typedef struct _D3DLOCKED_RECT {
1145 INT Pitch;
1146 void *pBits;
1147} D3DLOCKED_RECT;
1148
1149typedef struct _D3DMATERIAL9 {
1150 D3DCOLORVALUE Diffuse;
1151 D3DCOLORVALUE Ambient;
1152 D3DCOLORVALUE Specular;
1153 D3DCOLORVALUE Emissive;
1154 float Power;
1155} D3DMATERIAL9;
1156
1157typedef struct _D3DMATRIX {
1158 union {
1159 struct {
1160 float _11, _12, _13, _14;
1161 float _21, _22, _23, _24;
1162 float _31, _32, _33, _34;
1163 float _41, _42, _43, _44;
1164 };
1165 float m[4][4];
1166 };
1167} D3DMATRIX;
1168
1169typedef struct _D3DPRESENT_PARAMETERS {
1170 UINT BackBufferWidth;
1171 UINT BackBufferHeight;
1172 D3DFORMAT BackBufferFormat;
1173 UINT BackBufferCount;
1174 D3DMULTISAMPLE_TYPE MultiSampleType;
1175 DWORD MultiSampleQuality;
1176 D3DSWAPEFFECT SwapEffect;
1177 HWND hDeviceWindow;
1178 BOOL Windowed;
1179 BOOL EnableAutoDepthStencil;
1180 D3DFORMAT AutoDepthStencilFormat;
1181 DWORD Flags;
1182 UINT FullScreen_RefreshRateInHz;
1183 UINT PresentationInterval;
1184} D3DPRESENT_PARAMETERS;
1185
1186typedef struct _D3DRANGE
1187{
1188 UINT Offset;
1189 UINT Size;
1190} D3DRANGE;
1191
1192typedef struct _D3DRASTER_STATUS {
1193 BOOL InVBlank;
1194 UINT ScanLine;
1195} D3DRASTER_STATUS;
1196
1197typedef struct _D3DRECT {
1198 LONG x1;
1199 LONG y1;
1200 LONG x2;
1201 LONG y2;
1202} D3DRECT;
1203
1204typedef struct _D3DRECTPATCH_INFO {
1205 UINT StartVertexOffsetWidth;
1206 UINT StartVertexOffsetHeight;
1207 UINT Width;
1208 UINT Height;
1209 UINT Stride;
1210 D3DBASISTYPE Basis;
1211 D3DORDERTYPE Order;
1212} D3DRECTPATCH_INFO;
1213
1214typedef struct _D3DSURFACE_DESC {
1215 D3DFORMAT Format;
1216 D3DRESOURCETYPE Type;
1217 DWORD Usage;
1218 D3DPOOL Pool;
1219 UINT Size;
1220 D3DMULTISAMPLE_TYPE MultiSampleType;
1221 UINT Width;
1222 UINT Height;
1223} D3DSURFACE_DESC;
1224
1225typedef struct _D3DTRIPATCH_INFO {
1226 UINT StartVertexOffset;
1227 UINT NumVertices;
1228 D3DBASISTYPE Basis;
1229 D3DORDERTYPE Order;
1230} D3DTRIPATCH_INFO;
1231
1232typedef struct _D3DVERTEXBUFFER_DESC {
1233 D3DFORMAT Format;
1234 D3DRESOURCETYPE Type;
1235 DWORD Usage;
1236 D3DPOOL Pool;
1237 UINT Size;
1238 DWORD FVF;
1239} D3DVERTEXBUFFER_DESC;
1240
1241typedef struct _D3DVERTEXELEMENT9 {
1242 WORD Stream;
1243 WORD Offset;
1244 BYTE Type;
1245 BYTE Method;
1246 BYTE Usage;
1247 BYTE UsageIndex;
1248} D3DVERTEXELEMENT9, *LPD3DVERTEXELEMENT9;
1249
1250typedef struct _D3DVIEWPORT9 {
1251 DWORD X;
1252 DWORD Y;
1253 DWORD Width;
1254 DWORD Height;
1255 float MinZ;
1256 float MaxZ;
1257} D3DVIEWPORT9;
1258
1259typedef struct _D3DVOLUME_DESC {
1260 D3DFORMAT Format;
1261 D3DRESOURCETYPE Type;
1262 DWORD Usage;
1263 D3DPOOL Pool;
1264 UINT Width;
1265 UINT Height;
1266 UINT Depth;
1267} D3DVOLUME_DESC;
1268
1269#include <poppack.h>
1270
1271#endif
1272#endif
Note: See TracBrowser for help on using the repository browser.