6 /* This is needed for GL_LIGHT */
9 /*****************************************************************************
10 * Predeclare the interfaces
12 DEFINE_GUID(IID_IDirect3D
, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
13 DEFINE_GUID(IID_IDirect3D2
, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
14 DEFINE_GUID(IID_IDirect3D3
, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
16 DEFINE_GUID(IID_IDirect3DRampDevice
, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
17 DEFINE_GUID(IID_IDirect3DRGBDevice
, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
18 DEFINE_GUID(IID_IDirect3DHALDevice
, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
19 DEFINE_GUID(IID_IDirect3DMMXDevice
, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
21 DEFINE_GUID(IID_IDirect3DDevice
, 0x64108800,0x957d,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
22 DEFINE_GUID(IID_IDirect3DDevice2
, 0x93281501,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
23 DEFINE_GUID(IID_IDirect3DDevice3
, 0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
25 DEFINE_GUID(IID_IDirect3DTexture
, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
26 DEFINE_GUID(IID_IDirect3DTexture2
, 0x93281502,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
28 DEFINE_GUID(IID_IDirect3DLight
, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
30 DEFINE_GUID(IID_IDirect3DMaterial
, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
31 DEFINE_GUID(IID_IDirect3DMaterial2
, 0x93281503,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
32 DEFINE_GUID(IID_IDirect3DMaterial3
, 0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x00,0x60,0x08,0x52,0xb3,0x12);
34 DEFINE_GUID(IID_IDirect3DExecuteBuffer
, 0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
36 DEFINE_GUID(IID_IDirect3DViewport
, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
37 DEFINE_GUID(IID_IDirect3DViewport2
, 0x93281500,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
38 DEFINE_GUID(IID_IDirect3DViewport3
, 0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
40 DEFINE_GUID(IID_IDirect3DVertexBuffer
, 0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x00,0xa0,0xc9,0x03,0x67,0xf8);
42 typedef struct IDirect3D IDirect3D
,*LPDIRECT3D
;
43 typedef struct IDirect3D2 IDirect3D2
,*LPDIRECT3D2
;
44 typedef struct IDirect3D2 IDirect3D3
,*LPDIRECT3D3
;
46 typedef struct IDirect3DLight IDirect3DLight
,*LPDIRECT3DLIGHT
;
48 typedef struct IDirect3DDevice IDirect3DDevice
, *LPDIRECT3DDEVICE
;
49 typedef struct IDirect3DDevice2 IDirect3DDevice2
, *LPDIRECT3DDEVICE2
;
50 typedef struct IDirect3DDevice2 IDirect3DDevice3
, *LPDIRECT3DDEVICE3
;
52 typedef struct IDirect3DViewport2 IDirect3DViewport
, *LPDIRECT3DVIEWPORT
;
53 typedef struct IDirect3DViewport2 IDirect3DViewport2
, *LPDIRECT3DVIEWPORT2
;
54 typedef struct IDirect3DViewport2 IDirect3DViewport3
, *LPDIRECT3DVIEWPORT3
;
56 typedef struct IDirect3DMaterial2 IDirect3DMaterial
, *LPDIRECT3DMATERIAL
;
57 typedef struct IDirect3DMaterial2 IDirect3DMaterial2
, *LPDIRECT3DMATERIAL2
;
58 typedef struct IDirect3DMaterial2 IDirect3DMaterial3
, *LPDIRECT3DMATERIAL3
;
60 typedef struct IDirect3DTexture2 IDirect3DTexture
, *LPDIRECT3DTEXTURE
;
61 typedef struct IDirect3DTexture2 IDirect3DTexture2
, *LPDIRECT3DTEXTURE2
;
63 typedef struct IDirect3DExecuteBuffer IDirect3DExecuteBuffer
, *LPDIRECT3DEXECUTEBUFFER
;
65 typedef struct IDirect3DVertexBuffer IDirect3DVertexBuffer
, *LPDIRECT3DVERTEXBUFFER
;
67 /* ********************************************************************
69 ******************************************************************** */
71 #define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
72 #define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
73 #define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
74 #define D3DERR_INITFAILED MAKE_DDHRESULT(706)
75 #define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
76 #define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
77 #define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
78 #define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
79 #define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
80 #define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
81 #define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
82 #define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
83 #define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
84 #define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
85 #define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
86 #define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
87 #define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
88 #define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
89 #define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
90 #define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
91 #define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
92 #define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
93 #define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
94 #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
95 #define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
96 #define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
97 #define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
98 #define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
99 #define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
100 #define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
101 #define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
102 #define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
103 #define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
104 #define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
105 #define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
106 #define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
107 #define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
108 #define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
109 #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
110 #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
111 #define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
112 #define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
113 #define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
114 #define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
115 #define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
116 #define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
117 #define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
118 #define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
119 #define D3DERR_INBEGIN MAKE_DDHRESULT(770)
120 #define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
121 #define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
122 #define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
123 #define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
124 #define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
126 /* ********************************************************************
128 ******************************************************************** */
129 #define D3DNEXT_NEXT 0x01l
130 #define D3DNEXT_HEAD 0x02l
131 #define D3DNEXT_TAIL 0x04l
136 D3DLIGHT_DIRECTIONAL
= 3,
137 D3DLIGHT_PARALLELPOINT
= 4,
138 D3DLIGHT_FORCE_DWORD
= 0x7fffffff
145 D3DPT_TRIANGLELIST
= 4,
146 D3DPT_TRIANGLESTRIP
= 5,
147 D3DPT_TRIANGLEFAN
= 6,
148 D3DPT_FORCE_DWORD
= 0x7fffffff
153 D3DFILL_WIREFRAME
= 2,
155 D3DFILL_FORCE_DWORD
= 0x7fffffff
160 D3DSHADE_GOURAUD
= 2,
162 D3DSHADE_FORCE_DWORD
= 0x7fffffff
169 D3DCULL_FORCE_DWORD
= 0x7fffffff
175 D3DBLEND_SRCCOLOR
= 3,
176 D3DBLEND_INVSRCCOLOR
= 4,
177 D3DBLEND_SRCALPHA
= 5,
178 D3DBLEND_INVSRCALPHA
= 6,
179 D3DBLEND_DESTALPHA
= 7,
180 D3DBLEND_INVDESTALPHA
= 8,
181 D3DBLEND_DESTCOLOR
= 9,
182 D3DBLEND_INVDESTCOLOR
= 10,
183 D3DBLEND_SRCALPHASAT
= 11,
184 D3DBLEND_BOTHSRCALPHA
= 12,
185 D3DBLEND_BOTHINVSRCALPHA
= 13,
186 D3DBLEND_FORCE_DWORD
= 0x7fffffff
191 D3DTBLEND_MODULATE
= 2,
192 D3DTBLEND_DECALALPHA
= 3,
193 D3DTBLEND_MODULATEALPHA
= 4,
194 D3DTBLEND_DECALMASK
= 5,
195 D3DTBLEND_MODULATEMASK
= 6,
198 D3DTBLEND_FORCE_DWORD
= 0x7fffffff
202 D3DFILTER_NEAREST
= 1,
203 D3DFILTER_LINEAR
= 2,
204 D3DFILTER_MIPNEAREST
= 3,
205 D3DFILTER_MIPLINEAR
= 4,
206 D3DFILTER_LINEARMIPNEAREST
= 5,
207 D3DFILTER_LINEARMIPLINEAR
= 6,
208 D3DFILTER_FORCE_DWORD
= 0x7fffffff
212 D3DRENDERSTATE_TEXTUREHANDLE
= 1, /* Texture handle */
213 D3DRENDERSTATE_ANTIALIAS
= 2, /* D3DANTIALIASMODE */
214 D3DRENDERSTATE_TEXTUREADDRESS
= 3, /* D3DTEXTUREADDRESS */
215 D3DRENDERSTATE_TEXTUREPERSPECTIVE
= 4, /* TRUE for perspective correction */
216 D3DRENDERSTATE_WRAPU
= 5, /* TRUE for wrapping in u */
217 D3DRENDERSTATE_WRAPV
= 6, /* TRUE for wrapping in v */
218 D3DRENDERSTATE_ZENABLE
= 7, /* TRUE to enable z test */
219 D3DRENDERSTATE_FILLMODE
= 8, /* D3DFILL_MODE */
220 D3DRENDERSTATE_SHADEMODE
= 9, /* D3DSHADEMODE */
221 D3DRENDERSTATE_LINEPATTERN
= 10, /* D3DLINEPATTERN */
222 D3DRENDERSTATE_MONOENABLE
= 11, /* TRUE to enable mono rasterization */
223 D3DRENDERSTATE_ROP2
= 12, /* ROP2 */
224 D3DRENDERSTATE_PLANEMASK
= 13, /* DWORD physical plane mask */
225 D3DRENDERSTATE_ZWRITEENABLE
= 14, /* TRUE to enable z writes */
226 D3DRENDERSTATE_ALPHATESTENABLE
= 15, /* TRUE to enable alpha tests */
227 D3DRENDERSTATE_LASTPIXEL
= 16, /* TRUE for last-pixel on lines */
228 D3DRENDERSTATE_TEXTUREMAG
= 17, /* D3DTEXTUREFILTER */
229 D3DRENDERSTATE_TEXTUREMIN
= 18, /* D3DTEXTUREFILTER */
230 D3DRENDERSTATE_SRCBLEND
= 19, /* D3DBLEND */
231 D3DRENDERSTATE_DESTBLEND
= 20, /* D3DBLEND */
232 D3DRENDERSTATE_TEXTUREMAPBLEND
= 21, /* D3DTEXTUREBLEND */
233 D3DRENDERSTATE_CULLMODE
= 22, /* D3DCULL */
234 D3DRENDERSTATE_ZFUNC
= 23, /* D3DCMPFUNC */
235 D3DRENDERSTATE_ALPHAREF
= 24, /* D3DFIXED */
236 D3DRENDERSTATE_ALPHAFUNC
= 25, /* D3DCMPFUNC */
237 D3DRENDERSTATE_DITHERENABLE
= 26, /* TRUE to enable dithering */
238 D3DRENDERSTATE_ALPHABLENDENABLE
= 27, /* TRUE to enable alpha blending */
239 D3DRENDERSTATE_FOGENABLE
= 28, /* TRUE to enable fog */
240 D3DRENDERSTATE_SPECULARENABLE
= 29, /* TRUE to enable specular */
241 D3DRENDERSTATE_ZVISIBLE
= 30, /* TRUE to enable z checking */
242 D3DRENDERSTATE_SUBPIXEL
= 31, /* TRUE to enable subpixel correction */
243 D3DRENDERSTATE_SUBPIXELX
= 32, /* TRUE to enable correction in X only */
244 D3DRENDERSTATE_STIPPLEDALPHA
= 33, /* TRUE to enable stippled alpha */
245 D3DRENDERSTATE_FOGCOLOR
= 34, /* D3DCOLOR */
246 D3DRENDERSTATE_FOGTABLEMODE
= 35, /* D3DFOGMODE */
247 D3DRENDERSTATE_FOGTABLESTART
= 36, /* Fog table start */
248 D3DRENDERSTATE_FOGTABLEEND
= 37, /* Fog table end */
249 D3DRENDERSTATE_FOGTABLEDENSITY
= 38, /* Fog table density */
250 D3DRENDERSTATE_STIPPLEENABLE
= 39, /* TRUE to enable stippling */
251 D3DRENDERSTATE_EDGEANTIALIAS
= 40, /* TRUE to enable edge antialiasing */
252 D3DRENDERSTATE_COLORKEYENABLE
= 41, /* TRUE to enable source colorkeyed textures */
253 D3DRENDERSTATE_BORDERCOLOR
= 43, /* Border color for texturing w/border */
254 D3DRENDERSTATE_TEXTUREADDRESSU
= 44, /* Texture addressing mode for U coordinate */
255 D3DRENDERSTATE_TEXTUREADDRESSV
= 45, /* Texture addressing mode for V coordinate */
256 D3DRENDERSTATE_MIPMAPLODBIAS
= 46, /* D3DVALUE Mipmap LOD bias */
257 D3DRENDERSTATE_ZBIAS
= 47, /* LONG Z bias */
258 D3DRENDERSTATE_RANGEFOGENABLE
= 48, /* Enables range-based fog */
259 D3DRENDERSTATE_ANISOTROPY
= 49, /* Max. anisotropy. 1 = no anisotropy */
260 D3DRENDERSTATE_FLUSHBATCH
= 50, /* Explicit flush for DP batching (DX5 Only) */
261 D3DRENDERSTATE_STIPPLEPATTERN00
= 64, /* Stipple pattern 01... */
262 D3DRENDERSTATE_STIPPLEPATTERN01
= 65,
263 D3DRENDERSTATE_STIPPLEPATTERN02
= 66,
264 D3DRENDERSTATE_STIPPLEPATTERN03
= 67,
265 D3DRENDERSTATE_STIPPLEPATTERN04
= 68,
266 D3DRENDERSTATE_STIPPLEPATTERN05
= 69,
267 D3DRENDERSTATE_STIPPLEPATTERN06
= 70,
268 D3DRENDERSTATE_STIPPLEPATTERN07
= 71,
269 D3DRENDERSTATE_STIPPLEPATTERN08
= 72,
270 D3DRENDERSTATE_STIPPLEPATTERN09
= 73,
271 D3DRENDERSTATE_STIPPLEPATTERN10
= 74,
272 D3DRENDERSTATE_STIPPLEPATTERN11
= 75,
273 D3DRENDERSTATE_STIPPLEPATTERN12
= 76,
274 D3DRENDERSTATE_STIPPLEPATTERN13
= 77,
275 D3DRENDERSTATE_STIPPLEPATTERN14
= 78,
276 D3DRENDERSTATE_STIPPLEPATTERN15
= 79,
277 D3DRENDERSTATE_STIPPLEPATTERN16
= 80,
278 D3DRENDERSTATE_STIPPLEPATTERN17
= 81,
279 D3DRENDERSTATE_STIPPLEPATTERN18
= 82,
280 D3DRENDERSTATE_STIPPLEPATTERN19
= 83,
281 D3DRENDERSTATE_STIPPLEPATTERN20
= 84,
282 D3DRENDERSTATE_STIPPLEPATTERN21
= 85,
283 D3DRENDERSTATE_STIPPLEPATTERN22
= 86,
284 D3DRENDERSTATE_STIPPLEPATTERN23
= 87,
285 D3DRENDERSTATE_STIPPLEPATTERN24
= 88,
286 D3DRENDERSTATE_STIPPLEPATTERN25
= 89,
287 D3DRENDERSTATE_STIPPLEPATTERN26
= 90,
288 D3DRENDERSTATE_STIPPLEPATTERN27
= 91,
289 D3DRENDERSTATE_STIPPLEPATTERN28
= 92,
290 D3DRENDERSTATE_STIPPLEPATTERN29
= 93,
291 D3DRENDERSTATE_STIPPLEPATTERN30
= 94,
292 D3DRENDERSTATE_STIPPLEPATTERN31
= 95,
293 D3DRENDERSTATE_FORCE_DWORD
= 0x7fffffff /* force 32-bit size enum */
294 } D3DRENDERSTATETYPE
;
300 D3DCMP_LESSEQUAL
= 4,
303 D3DCMP_GREATEREQUAL
= 7,
305 D3DCMP_FORCE_DWORD
= 0x7fffffff
309 D3DLIGHTSTATE_MATERIAL
= 1,
310 D3DLIGHTSTATE_AMBIENT
= 2,
311 D3DLIGHTSTATE_COLORMODEL
= 3,
312 D3DLIGHTSTATE_FOGMODE
= 4,
313 D3DLIGHTSTATE_FOGSTART
= 5,
314 D3DLIGHTSTATE_FOGEND
= 6,
315 D3DLIGHTSTATE_FOGDENSITY
= 7,
316 D3DLIGHTSTATE_FORCE_DWORD
= 0x7fffffff /* force 32-bit size enum */
323 D3DVT_FORCE_DWORD
= 0x7fffffff /* force 32-bit size enum */
327 D3DTRANSFORMSTATE_WORLD
= 1,
328 D3DTRANSFORMSTATE_VIEW
= 2,
329 D3DTRANSFORMSTATE_PROJECTION
= 3,
330 D3DTRANSFORMSTATE_FORCE_DWORD
= 0x7fffffff /* force 32-bit size enum */
331 } D3DTRANSFORMSTATETYPE
;
333 /* ********************************************************************
335 ******************************************************************** */
336 typedef DWORD D3DMATERIALHANDLE
, *LPD3DMATERIALHANDLE
;
337 typedef DWORD D3DTEXTUREHANDLE
, *LPD3DTEXTUREHANDLE
;
338 typedef DWORD D3DVIEWPORTHANDLE
, *LPD3DVIEWPORTHANDLE
;
339 typedef DWORD D3DMATRIXHANDLE
, *LPD3DMATRIXHANDLE
;
341 typedef DWORD D3DCOLOR
, *LPD3DCOLOR
;
346 } D3DTRANSFORMCAPS
,*LPD3DTRANSFORMCAPS
;
348 #define D3DTRANSFORMCAPS_CLIP 0x00000001
353 DWORD dwLightingModel
;
355 } D3DLIGHTINGCAPS
, *LPD3DLIGHTINGCAPS
;
357 #define D3DLIGHTINGMODEL_RGB 0x00000001
358 #define D3DLIGHTINGMODEL_MONO 0x00000002
360 #define D3DLIGHTCAPS_POINT 0x00000001
361 #define D3DLIGHTCAPS_SPOT 0x00000002
362 #define D3DLIGHTCAPS_DIRECTIONAL 0x00000004
363 #define D3DLIGHTCAPS_PARALLELPOINT 0x00000008
366 #define D3DCOLOR_MONO 1
367 #define D3DCOLOR_RGB 2
369 typedef DWORD D3DCOLORMODEL
;
373 DWORD dwMiscCaps
; /* Capability flags */
376 DWORD dwSrcBlendCaps
;
377 DWORD dwDestBlendCaps
;
378 DWORD dwAlphaCmpCaps
;
381 DWORD dwTextureFilterCaps
;
382 DWORD dwTextureBlendCaps
;
383 DWORD dwTextureAddressCaps
;
384 DWORD dwStippleWidth
; /* maximum width and height of */
385 DWORD dwStippleHeight
; /* of supported stipple (up to 32x32) */
386 } D3DPRIMCAPS
, *LPD3DPRIMCAPS
;
388 /* D3DPRIMCAPS.dwMiscCaps */
389 #define D3DPMISCCAPS_MASKPLANES 0x00000001
390 #define D3DPMISCCAPS_MASKZ 0x00000002
391 #define D3DPMISCCAPS_LINEPATTERNREP 0x00000004
392 #define D3DPMISCCAPS_CONFORMANT 0x00000008
393 #define D3DPMISCCAPS_CULLNONE 0x00000010
394 #define D3DPMISCCAPS_CULLCW 0x00000020
395 #define D3DPMISCCAPS_CULLCCW 0x00000040
397 /* D3DPRIMCAPS.dwRasterCaps */
398 #define D3DPRASTERCAPS_DITHER 0x00000001
399 #define D3DPRASTERCAPS_ROP2 0x00000002
400 #define D3DPRASTERCAPS_XOR 0x00000004
401 #define D3DPRASTERCAPS_PAT 0x00000008
402 #define D3DPRASTERCAPS_ZTEST 0x00000010
403 #define D3DPRASTERCAPS_SUBPIXEL 0x00000020
404 #define D3DPRASTERCAPS_SUBPIXELX 0x00000040
405 #define D3DPRASTERCAPS_FOGVERTEX 0x00000080
406 #define D3DPRASTERCAPS_FOGTABLE 0x00000100
407 #define D3DPRASTERCAPS_STIPPLE 0x00000200
408 #define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400
409 #define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800
410 #define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000
411 #define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000
412 #define D3DPRASTERCAPS_ZBIAS 0x00004000
413 #define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000
414 #define D3DPRASTERCAPS_FOGRANGE 0x00010000
415 #define D3DPRASTERCAPS_ANISOTROPY 0x00020000
417 /* D3DPRIMCAPS.dwZCmpCaps and dwAlphaCmpCaps */
418 #define D3DPCMPCAPS_NEVER 0x00000001
419 #define D3DPCMPCAPS_LESS 0x00000002
420 #define D3DPCMPCAPS_EQUAL 0x00000004
421 #define D3DPCMPCAPS_LESSEQUAL 0x00000008
422 #define D3DPCMPCAPS_GREATER 0x00000010
423 #define D3DPCMPCAPS_NOTEQUAL 0x00000020
424 #define D3DPCMPCAPS_GREATEREQUAL 0x00000040
425 #define D3DPCMPCAPS_ALWAYS 0x00000080
427 /* D3DPRIMCAPS.dwSourceBlendCaps, dwDestBlendCaps */
428 #define D3DPBLENDCAPS_ZERO 0x00000001
429 #define D3DPBLENDCAPS_ONE 0x00000002
430 #define D3DPBLENDCAPS_SRCCOLOR 0x00000004
431 #define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008
432 #define D3DPBLENDCAPS_SRCALPHA 0x00000010
433 #define D3DPBLENDCAPS_INVSRCALPHA 0x00000020
434 #define D3DPBLENDCAPS_DESTALPHA 0x00000040
435 #define D3DPBLENDCAPS_INVDESTALPHA 0x00000080
436 #define D3DPBLENDCAPS_DESTCOLOR 0x00000100
437 #define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200
438 #define D3DPBLENDCAPS_SRCALPHASAT 0x00000400
439 #define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800
440 #define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000
442 /* D3DPRIMCAPS.dwShadeCaps */
443 #define D3DPSHADECAPS_COLORFLATMONO 0x00000001
444 #define D3DPSHADECAPS_COLORFLATRGB 0x00000002
445 #define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004
446 #define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008
447 #define D3DPSHADECAPS_COLORPHONGMONO 0x00000010
448 #define D3DPSHADECAPS_COLORPHONGRGB 0x00000020
450 #define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040
451 #define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080
452 #define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100
453 #define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200
454 #define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400
455 #define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800
457 #define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000
458 #define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000
459 #define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000
460 #define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000
461 #define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000
462 #define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000
464 #define D3DPSHADECAPS_FOGFLAT 0x00040000
465 #define D3DPSHADECAPS_FOGGOURAUD 0x00080000
466 #define D3DPSHADECAPS_FOGPHONG 0x00100000
468 /* D3DPRIMCAPS.dwTextureCaps */
469 #define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001
470 #define D3DPTEXTURECAPS_POW2 0x00000002
471 #define D3DPTEXTURECAPS_ALPHA 0x00000004
472 #define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008
473 #define D3DPTEXTURECAPS_BORDER 0x00000010
474 #define D3DPTEXTURECAPS_SQUAREONLY 0x00000020
476 /* D3DPRIMCAPS.dwTextureFilterCaps */
477 #define D3DPTFILTERCAPS_NEAREST 0x00000001
478 #define D3DPTFILTERCAPS_LINEAR 0x00000002
479 #define D3DPTFILTERCAPS_MIPNEAREST 0x00000004
480 #define D3DPTFILTERCAPS_MIPLINEAR 0x00000008
481 #define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010
482 #define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020
484 /* D3DPRIMCAPS.dwTextureBlendCaps */
485 #define D3DPTBLENDCAPS_DECAL 0x00000001
486 #define D3DPTBLENDCAPS_MODULATE 0x00000002
487 #define D3DPTBLENDCAPS_DECALALPHA 0x00000004
488 #define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008
489 #define D3DPTBLENDCAPS_DECALMASK 0x00000010
490 #define D3DPTBLENDCAPS_MODULATEMASK 0x00000020
491 #define D3DPTBLENDCAPS_COPY 0x00000040
492 #define D3DPTBLENDCAPS_ADD 0x00000080
494 /* D3DPRIMCAPS.dwTextureAddressCaps */
495 #define D3DPTADDRESSCAPS_WRAP 0x00000001
496 #define D3DPTADDRESSCAPS_MIRROR 0x00000002
497 #define D3DPTADDRESSCAPS_CLAMP 0x00000004
498 #define D3DPTADDRESSCAPS_BORDER 0x00000008
499 #define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010
502 /* D3DDEVICEDESC.dwFlags */
503 #define D3DDD_COLORMODEL 0x00000001
504 #define D3DDD_DEVCAPS 0x00000002
505 #define D3DDD_TRANSFORMCAPS 0x00000004
506 #define D3DDD_LIGHTINGCAPS 0x00000008
507 #define D3DDD_BCLIPPING 0x00000010
508 #define D3DDD_LINECAPS 0x00000020
509 #define D3DDD_TRICAPS 0x00000040
510 #define D3DDD_DEVICERENDERBITDEPTH 0x00000080
511 #define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100
512 #define D3DDD_MAXBUFFERSIZE 0x00000200
513 #define D3DDD_MAXVERTEXCOUNT 0x00000400
515 /* D3DDEVICEDESC.dwDevCaps */
516 #define D3DDEVCAPS_FLOATTLVERTEX 0x00000001
517 #define D3DDEVCAPS_SORTINCREASINGZ 0x00000002
518 #define D3DDEVCAPS_SORTDECREASINGZ 0X00000004
519 #define D3DDEVCAPS_SORTEXACT 0x00000008
520 #define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010
521 #define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020
522 #define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040
523 #define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080
524 #define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100
525 #define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200
526 #define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400
527 #define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800
528 #define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000
530 typedef struct _D3DDeviceDesc
{
533 D3DCOLORMODEL dcmColorModel
;
535 D3DTRANSFORMCAPS dtcTransformCaps
;
537 D3DLIGHTINGCAPS dlcLightingCaps
;
538 D3DPRIMCAPS dpcLineCaps
;
539 D3DPRIMCAPS dpcTriCaps
;
540 DWORD dwDeviceRenderBitDepth
;
541 DWORD dwDeviceZBufferBitDepth
;
542 DWORD dwMaxBufferSize
;
543 DWORD dwMaxVertexCount
;
544 /* *** New fields for DX5 *** */
545 DWORD dwMinTextureWidth
,dwMinTextureHeight
;
546 DWORD dwMaxTextureWidth
,dwMaxTextureHeight
;
547 DWORD dwMinStippleWidth
,dwMaxStippleWidth
;
548 DWORD dwMinStippleHeight
,dwMaxStippleHeight
;
549 } D3DDEVICEDESC
,*LPD3DDEVICEDESC
;
551 typedef HRESULT (CALLBACK
* LPD3DENUMDEVICESCALLBACK
)(LPGUID lpGuid
,LPSTR lpDeviceDescription
,LPSTR lpDeviceName
,LPD3DDEVICEDESC
,LPD3DDEVICEDESC
,LPVOID
);
552 typedef HRESULT (CALLBACK
* LPD3DVALIDATECALLBACK
)(LPVOID lpUserArg
, DWORD dwOffset
);
555 /* dwflags for FindDevice */
556 #define D3DFDS_COLORMODEL 0x00000001
557 #define D3DFDS_GUID 0x00000002
558 #define D3DFDS_HARDWARE 0x00000004
559 #define D3DFDS_TRIANGLES 0x00000008
560 #define D3DFDS_LINES 0x00000010
561 #define D3DFDS_MISCCAPS 0x00000020
562 #define D3DFDS_RASTERCAPS 0x00000040
563 #define D3DFDS_ZCMPCAPS 0x00000080
564 #define D3DFDS_ALPHACMPCAPS 0x00000100
565 #define D3DFDS_DSTBLENDCAPS 0x00000400
566 #define D3DFDS_SHADECAPS 0x00000800
567 #define D3DFDS_TEXTURECAPS 0x00001000
568 #define D3DFDS_TEXTUREFILTERCAPS 0x00002000
569 #define D3DFDS_TEXTUREBLENDCAPS 0x00004000
570 #define D3DFDS_TEXTUREADDRESSCAPS 0x00008000
576 D3DCOLORMODEL dcmColorModel
;
579 D3DPRIMCAPS dpcPrimCaps
;
580 } D3DFINDDEVICESEARCH
,*LPD3DFINDDEVICESEARCH
;
585 D3DDEVICEDESC ddHwDesc
;
586 D3DDEVICEDESC ddSwDesc
;
587 } D3DFINDDEVICERESULT
,*LPD3DFINDDEVICERESULT
;
589 #define D3DVALP(val, prec) ((float)(val))
590 #define D3DVAL(val) ((float)(val))
591 typedef float D3DVALUE
,*LPD3DVALUE
;
592 #define D3DDivide(a, b) (float)((double) (a) / (double) (b))
593 #define D3DMultiply(a, b) ((a) * (b))
596 DWORD dwFlags
; /* Homogeneous clipping flags */
609 } D3DHVERTEX
, *LPD3DHVERTEX
;
611 * Transformed/lit vertices
615 D3DVALUE sx
; /* Screen coordinates */
627 D3DVALUE rhw
; /* Reciprocal of homogeneous w */
631 D3DCOLOR color
; /* Vertex color */
635 D3DCOLOR specular
; /* Specular component of vertex */
639 D3DVALUE tu
; /* Texture coordinates */
646 } D3DTLVERTEX
, *LPD3DTLVERTEX
;
649 D3DVALUE x
; /* Homogeneous coordinates */
662 D3DCOLOR color
; /* Vertex color */
666 D3DCOLOR specular
; /* Specular component of vertex */
670 D3DVALUE tu
; /* Texture coordinates */
677 } D3DLVERTEX
, *LPD3DLVERTEX
;
680 D3DVALUE x
; /* Homogeneous coordinates */
692 D3DVALUE nx
; /* Normal */
704 D3DVALUE tu
; /* Texture coordinates */
711 } D3DVERTEX
, *LPD3DVERTEX
;
730 } D3DRECT
, *LPD3DRECT
;
745 /* the c++ variant has operator overloads etc. too */
746 } D3DVECTOR
,*LPD3DVECTOR
;
749 D3DVALUE _11
, _12
, _13
, _14
;
750 D3DVALUE _21
, _22
, _23
, _24
;
751 D3DVALUE _31
, _32
, _33
, _34
;
752 D3DVALUE _41
, _42
, _43
, _44
;
753 } D3DMATRIX
, *LPD3DMATRIX
;
755 typedef struct _D3DCOLORVALUE
{
772 } D3DCOLORVALUE
,*LPD3DCOLORVALUE
;
776 D3DLIGHTTYPE dltType
;
777 D3DCOLORVALUE dcvColor
;
778 D3DVECTOR dvPosition
; /* Position in world space */
779 D3DVECTOR dvDirection
; /* Direction in world space */
780 D3DVALUE dvRange
; /* Cutoff range */
781 D3DVALUE dvFalloff
; /* Falloff */
782 D3DVALUE dvAttenuation0
; /* Constant attenuation */
783 D3DVALUE dvAttenuation1
; /* Linear attenuation */
784 D3DVALUE dvAttenuation2
; /* Quadratic attenuation */
785 D3DVALUE dvTheta
; /* Inner angle of spotlight cone */
786 D3DVALUE dvPhi
; /* Outer angle of spotlight cone */
787 } D3DLIGHT
,*LPD3DLIGHT
;
790 #define D3DLIGHT_ACTIVE 0x00000001
791 #define D3DLIGHT_NO_SPECULAR 0x00000002
793 /* Textures and Pixel formats*/
795 typedef HRESULT (CALLBACK
* LPD3DENUMTEXTUREFORMATSCALLBACK
)(LPDDSURFACEDESC lpDdsd
, LPVOID lpContext
);
796 /* Used in Dx 6.0 for both Z buffers and Textures */
797 typedef HRESULT (CALLBACK
* LPD3DENUMPIXELFORMATSCALLBACK
)(LPDDPIXELFORMAT lpDDPixFmt
, LPVOID lpContext
);
800 /* Statistics structure */
803 DWORD dwTrianglesDrawn
;
807 DWORD dwVerticesProcessed
;
808 } D3DSTATS
, *LPD3DSTATS
;
811 typedef struct _D3DCLIPSTATUS
{
812 DWORD dwFlags
; /* Do we set 2d extents, 3D extents or status */
813 DWORD dwStatus
; /* Clip status */
814 float minx
, maxx
; /* X extents */
815 float miny
, maxy
; /* Y extents */
816 float minz
, maxz
; /* Z extents */
817 } D3DCLIPSTATUS
, *LPD3DCLIPSTATUS
;
822 D3DCOLORVALUE diffuse
; /* Diffuse color RGBA */
823 D3DCOLORVALUE dcvDiffuse
;
826 D3DCOLORVALUE ambient
; /* Ambient color RGB */
827 D3DCOLORVALUE dcvAmbient
;
830 D3DCOLORVALUE specular
; /* Specular 'shininess' */
831 D3DCOLORVALUE dcvSpecular
;
834 D3DCOLORVALUE emissive
; /* Emissive color RGB */
835 D3DCOLORVALUE dcvEmissive
;
838 D3DVALUE power
; /* Sharpness if specular highlight */
841 D3DTEXTUREHANDLE hTexture
; /* Handle to texture map */
843 } D3DMATERIAL
, *LPD3DMATERIAL
;
846 D3DVECTOR dvPosition
; /* Lightable point in model space */
847 D3DVECTOR dvNormal
; /* Normalised unit vector */
848 } D3DLIGHTINGELEMENT
, *LPD3DLIGHTINGELEMENT
;
853 DWORD dwY
; /* Top left */
855 DWORD dwHeight
; /* Dimensions */
856 D3DVALUE dvScaleX
; /* Scale homogeneous to screen */
857 D3DVALUE dvScaleY
; /* Scale homogeneous to screen */
858 D3DVALUE dvMaxX
; /* Min/max homogeneous x coord */
859 D3DVALUE dvMaxY
; /* Min/max homogeneous y coord */
861 D3DVALUE dvMaxZ
; /* Min/max homogeneous z coord */
862 } D3DVIEWPORT
, *LPD3DVIEWPORT
;
867 DWORD dwY
; /* Viewport Top left */
869 DWORD dwHeight
; /* Viewport Dimensions */
870 D3DVALUE dvClipX
; /* Top left of clip volume */
872 D3DVALUE dvClipWidth
; /* Clip Volume Dimensions */
873 D3DVALUE dvClipHeight
;
874 D3DVALUE dvMinZ
; /* Min/max of clip Volume */
876 } D3DVIEWPORT2
, *LPD3DVIEWPORT2
;
878 #define D3DTRANSFORM_CLIPPED 0x00000001l
879 #define D3DTRANSFORM_UNCLIPPED 0x00000002l
883 LPVOID lpIn
; /* Input vertices */
884 DWORD dwInSize
; /* Stride of input vertices */
885 LPVOID lpOut
; /* Output vertices */
886 DWORD dwOutSize
; /* Stride of output vertices */
887 LPD3DHVERTEX lpHOut
; /* Output homogeneous vertices */
888 DWORD dwClip
; /* Clipping hint */
889 DWORD dwClipIntersection
;
890 DWORD dwClipUnion
; /* Union of all clip flags */
891 D3DRECT drExtent
; /* Extent of transformed vertices */
892 } D3DTRANSFORMDATA
, *LPD3DTRANSFORMDATA
;
895 #define D3DLIGHT_ACTIVE 0x00000001
896 #define D3DLIGHT_NO_SPECULAR 0x00000002
898 /* maximum valid light range */
899 #define D3DLIGHT_RANGE_MAX ((float)sqrt(FLT_MAX))
901 typedef struct _D3DLIGHT2
{
903 D3DLIGHTTYPE dltType
; /* Type of light source */
904 D3DCOLORVALUE dcvColor
; /* Color of light */
905 D3DVECTOR dvPosition
; /* Position in world space */
906 D3DVECTOR dvDirection
; /* Direction in world space */
907 D3DVALUE dvRange
; /* Cutoff range */
908 D3DVALUE dvFalloff
; /* Falloff */
909 D3DVALUE dvAttenuation0
; /* Constant attenuation */
910 D3DVALUE dvAttenuation1
; /* Linear attenuation */
911 D3DVALUE dvAttenuation2
; /* Quadratic attenuation */
912 D3DVALUE dvTheta
; /* Inner angle of spotlight cone */
913 D3DVALUE dvPhi
; /* Outer angle of spotlight cone */
915 } D3DLIGHT2
, *LPD3DLIGHT2
;
917 typedef struct _D3DLIGHTDATA
{
919 LPD3DLIGHTINGELEMENT lpIn
; /* Input positions and normals */
920 DWORD dwInSize
; /* Stride of input elements */
921 LPD3DTLVERTEX lpOut
; /* Output colors */
922 DWORD dwOutSize
; /* Stride of output colors */
923 } D3DLIGHTDATA
, *LPD3DLIGHTDATA
;
925 typedef struct _D3DPICKRECORD
{
930 } D3DPICKRECORD
, *LPD3DPICKRECORD
;
933 typedef struct _D3DExecuteBufferDesc
{
939 } D3DEXECUTEBUFFERDESC
;
940 typedef D3DEXECUTEBUFFERDESC
*LPD3DEXECUTEBUFFERDESC
;
942 #define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
943 #define D3DDEB_CAPS 0x00000002l /* caps valid */
944 #define D3DDEB_LPDATA 0x00000004l /* lpData valid */
946 #define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
947 #define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
948 #define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
951 * Values for d3d status.
953 #define D3DSTATUS_CLIPUNIONLEFT D3DCLIP_LEFT
954 #define D3DSTATUS_CLIPUNIONRIGHT D3DCLIP_RIGHT
955 #define D3DSTATUS_CLIPUNIONTOP D3DCLIP_TOP
956 #define D3DSTATUS_CLIPUNIONBOTTOM D3DCLIP_BOTTOM
957 #define D3DSTATUS_CLIPUNIONFRONT D3DCLIP_FRONT
958 #define D3DSTATUS_CLIPUNIONBACK D3DCLIP_BACK
959 #define D3DSTATUS_CLIPUNIONGEN0 D3DCLIP_GEN0
960 #define D3DSTATUS_CLIPUNIONGEN1 D3DCLIP_GEN1
961 #define D3DSTATUS_CLIPUNIONGEN2 D3DCLIP_GEN2
962 #define D3DSTATUS_CLIPUNIONGEN3 D3DCLIP_GEN3
963 #define D3DSTATUS_CLIPUNIONGEN4 D3DCLIP_GEN4
964 #define D3DSTATUS_CLIPUNIONGEN5 D3DCLIP_GEN5
966 #define D3DSTATUS_CLIPINTERSECTIONLEFT 0x00001000L
967 #define D3DSTATUS_CLIPINTERSECTIONRIGHT 0x00002000L
968 #define D3DSTATUS_CLIPINTERSECTIONTOP 0x00004000L
969 #define D3DSTATUS_CLIPINTERSECTIONBOTTOM 0x00008000L
970 #define D3DSTATUS_CLIPINTERSECTIONFRONT 0x00010000L
971 #define D3DSTATUS_CLIPINTERSECTIONBACK 0x00020000L
972 #define D3DSTATUS_CLIPINTERSECTIONGEN0 0x00040000L
973 #define D3DSTATUS_CLIPINTERSECTIONGEN1 0x00080000L
974 #define D3DSTATUS_CLIPINTERSECTIONGEN2 0x00100000L
975 #define D3DSTATUS_CLIPINTERSECTIONGEN3 0x00200000L
976 #define D3DSTATUS_CLIPINTERSECTIONGEN4 0x00400000L
977 #define D3DSTATUS_CLIPINTERSECTIONGEN5 0x00800000L
978 #define D3DSTATUS_ZNOTVISIBLE 0x01000000L
980 #define D3DSTATUS_CLIPUNIONALL ( \
981 D3DSTATUS_CLIPUNIONLEFT | \
982 D3DSTATUS_CLIPUNIONRIGHT | \
983 D3DSTATUS_CLIPUNIONTOP | \
984 D3DSTATUS_CLIPUNIONBOTTOM | \
985 D3DSTATUS_CLIPUNIONFRONT | \
986 D3DSTATUS_CLIPUNIONBACK | \
987 D3DSTATUS_CLIPUNIONGEN0 | \
988 D3DSTATUS_CLIPUNIONGEN1 | \
989 D3DSTATUS_CLIPUNIONGEN2 | \
990 D3DSTATUS_CLIPUNIONGEN3 | \
991 D3DSTATUS_CLIPUNIONGEN4 | \
992 D3DSTATUS_CLIPUNIONGEN5 \
995 #define D3DSTATUS_CLIPINTERSECTIONALL ( \
996 D3DSTATUS_CLIPINTERSECTIONLEFT | \
997 D3DSTATUS_CLIPINTERSECTIONRIGHT | \
998 D3DSTATUS_CLIPINTERSECTIONTOP | \
999 D3DSTATUS_CLIPINTERSECTIONBOTTOM | \
1000 D3DSTATUS_CLIPINTERSECTIONFRONT | \
1001 D3DSTATUS_CLIPINTERSECTIONBACK | \
1002 D3DSTATUS_CLIPINTERSECTIONGEN0 | \
1003 D3DSTATUS_CLIPINTERSECTIONGEN1 | \
1004 D3DSTATUS_CLIPINTERSECTIONGEN2 | \
1005 D3DSTATUS_CLIPINTERSECTIONGEN3 | \
1006 D3DSTATUS_CLIPINTERSECTIONGEN4 | \
1007 D3DSTATUS_CLIPINTERSECTIONGEN5 \
1010 #define D3DSTATUS_DEFAULT ( \
1011 D3DSTATUS_CLIPINTERSECTIONALL | \
1012 D3DSTATUS_ZNOTVISIBLE)
1015 typedef struct _D3DSTATUS
{
1019 } D3DSTATUS
, *LPD3DSTATUS
;
1022 typedef struct _D3DEXECUTEDATA
{
1024 DWORD dwVertexOffset
;
1025 DWORD dwVertexCount
;
1026 DWORD dwInstructionOffset
;
1027 DWORD dwInstructionLength
;
1028 DWORD dwHVertexOffset
;
1030 } D3DEXECUTEDATA
, *LPD3DEXECUTEDATA
;
1032 typedef enum _D3DOPCODE
{
1036 D3DOP_MATRIXLOAD
= 4,
1037 D3DOP_MATRIXMULTIPLY
= 5,
1038 D3DOP_STATETRANSFORM
= 6,
1039 D3DOP_STATELIGHT
= 7,
1040 D3DOP_STATERENDER
= 8,
1041 D3DOP_PROCESSVERTICES
= 9,
1042 D3DOP_TEXTURELOAD
= 10,
1044 D3DOP_BRANCHFORWARD
= 12,
1046 D3DOP_SETSTATUS
= 14,
1048 D3DOP_FORCE_DWORD
= 0x7fffffff
1051 typedef struct _D3DPOINT
{
1054 } D3DPOINT
, *LPD3DPOINT
;
1056 typedef struct _D3DLINE
{
1065 } D3DLINE
, *LPD3DLINE
;
1067 #define D3DTRIFLAG_START 0x00000000L
1068 #define D3DTRIFLAG_STARTFLAT(len) (len) /* 0 < len < 30 */
1069 #define D3DTRIFLAG_ODD 0x0000001eL
1070 #define D3DTRIFLAG_EVEN 0x0000001fL
1072 #define D3DTRIFLAG_EDGEENABLE1 0x00000100L /* v0-v1 edge */
1073 #define D3DTRIFLAG_EDGEENABLE2 0x00000200L /* v1-v2 edge */
1074 #define D3DTRIFLAG_EDGEENABLE3 0x00000400L /* v2-v0 edge */
1075 #define D3DTRIFLAG_EDGEENABLETRIANGLE \
1076 (D3DTRIFLAG_EDGEENABLE1 | D3DTRIFLAG_EDGEENABLE2 | D3DTRIFLAG_EDGEENABLE3)
1078 typedef struct _D3DTRIANGLE
{
1092 } D3DTRIANGLE
, *LPD3DTRIANGLE
;
1094 typedef struct _D3DMATRIXLOAD
{
1095 D3DMATRIXHANDLE hDestMatrix
;
1096 D3DMATRIXHANDLE hSrcMatrix
;
1097 } D3DMATRIXLOAD
, *LPD3DMATRIXLOAD
;
1099 typedef struct _D3DMATRIXMULTIPLY
{
1100 D3DMATRIXHANDLE hDestMatrix
;
1101 D3DMATRIXHANDLE hSrcMatrix1
;
1102 D3DMATRIXHANDLE hSrcMatrix2
;
1103 } D3DMATRIXMULTIPLY
, *LPD3DMATRIXMULTIPLY
;
1105 typedef struct _D3DSTATE
{
1107 D3DTRANSFORMSTATETYPE dtstTransformStateType
;
1108 D3DLIGHTSTATETYPE dlstLightStateType
;
1109 D3DRENDERSTATETYPE drstRenderStateType
;
1115 } D3DSTATE
, *LPD3DSTATE
;
1117 #define D3DPROCESSVERTICES_TRANSFORMLIGHT 0x00000000L
1118 #define D3DPROCESSVERTICES_TRANSFORM 0x00000001L
1119 #define D3DPROCESSVERTICES_COPY 0x00000002L
1120 #define D3DPROCESSVERTICES_OPMASK 0x00000007L
1122 #define D3DPROCESSVERTICES_UPDATEEXTENTS 0x00000008L
1123 #define D3DPROCESSVERTICES_NOCOLOR 0x00000010L
1125 typedef struct _D3DPROCESSVERTICES
{
1131 } D3DPROCESSVERTICES
, *LPD3DPROCESSVERTICES
;
1133 typedef struct _D3DTEXTURELOAD
{
1134 D3DTEXTUREHANDLE hDestTexture
;
1135 D3DTEXTUREHANDLE hSrcTexture
;
1136 } D3DTEXTURELOAD
, *LPD3DTEXTURELOAD
;
1138 typedef struct _D3DBRANCH
{
1143 } D3DBRANCH
, *LPD3DBRANCH
;
1145 typedef struct _D3DSPAN
{
1148 } D3DSPAN
, *LPD3DSPAN
;
1150 typedef struct _D3DINSTRUCTION
{
1154 } D3DINSTRUCTION
, *LPD3DINSTRUCTION
;
1157 typedef struct _D3DVERTEXBUFFERDESC
{
1161 DWORD dwNumVertices
;
1162 } D3DVERTEXBUFFERDESC
, *LPD3DVERTEXBUFFERDESC
;
1164 typedef struct _D3DDP_PTRSTRIDE
{
1169 #define D3DDP_MAXTEXCOORD 8
1170 typedef struct _D3DDRAWPRIMITIVESTRIDEDDATA
{
1171 D3DDP_PTRSTRIDE position
;
1172 D3DDP_PTRSTRIDE normal
;
1173 D3DDP_PTRSTRIDE diffuse
;
1174 D3DDP_PTRSTRIDE specular
;
1175 D3DDP_PTRSTRIDE textureCoords
[D3DDP_MAXTEXCOORD
];
1176 } D3DDRAWPRIMITIVESTRIDEDDATA
,*LPD3DDRAWPRIMITIVESTRIDEDDATA
;
1178 typedef enum _D3DTEXTURESTAGESTATETYPE
{
1180 D3DTSS_COLORARG1
= 2,
1181 D3DTSS_COLORARG2
= 3,
1183 D3DTSS_ALPHAARG1
= 5,
1184 D3DTSS_ALPHAARG2
= 6,
1185 D3DTSS_BUMPENVMAT00
= 7,
1186 D3DTSS_BUMPENVMAT01
= 8,
1187 D3DTSS_BUMPENVMAT10
= 9,
1188 D3DTSS_BUMPENVMAT11
= 10,
1189 D3DTSS_TEXCOORDINDEX
= 11,
1190 D3DTSS_ADDRESS
= 12,
1191 D3DTSS_ADDRESSU
= 13,
1192 D3DTSS_ADDRESSV
= 14,
1193 D3DTSS_BORDERCOLOR
= 15,
1194 D3DTSS_MAGFILTER
= 16,
1195 D3DTSS_MINFILTER
= 17,
1196 D3DTSS_MIPFILTER
= 18,
1197 D3DTSS_MIPMAPLODBIAS
= 19,
1198 D3DTSS_MAXMIPLEVEL
= 20,
1199 D3DTSS_MAXANISOTROPY
= 21,
1200 D3DTSS_BUMPENVLSCALE
= 22,
1201 D3DTSS_BUMPENVLOFFSET
= 23,
1202 D3DTSS_FORCE_DWORD
= 0x7fffffff
1203 } D3DTEXTURESTAGESTATETYPE
;
1205 /*****************************************************************************
1206 * IDirect3D interface
1208 #define ICOM_INTERFACE IDirect3D
1209 #define IDirect3D_METHODS \
1210 ICOM_METHOD1(HRESULT,Initialize, REFIID,riid) \
1211 ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK,lpEnumDevicesCallback, LPVOID,lpUserArg) \
1212 ICOM_METHOD2(HRESULT,CreateLight, LPDIRECT3DLIGHT*,lplpDirect3DLight, IUnknown*,pUnkOuter) \
1213 ICOM_METHOD2(HRESULT,CreateMaterial, LPDIRECT3DMATERIAL*,lplpDirect3DMaterial, IUnknown*,pUnkOuter) \
1214 ICOM_METHOD2(HRESULT,CreateViewport, LPDIRECT3DVIEWPORT*,lplpD3DViewport, IUnknown*,pUnkOuter) \
1215 ICOM_METHOD2(HRESULT,FindDevice, LPD3DFINDDEVICESEARCH,lpD3DDFS, LPD3DFINDDEVICERESULT,lplpD3DDevice)
1216 #define IDirect3D_IMETHODS \
1219 ICOM_DEFINE(IDirect3D
,IUnknown
)
1220 #undef ICOM_INTERFACE
1222 /*** IUnknown methods ***/
1223 #define IDirect3D_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1224 #define IDirect3D_AddRef(p) ICOM_CALL (AddRef,p)
1225 #define IDirect3D_Release(p) ICOM_CALL (Release,p)
1226 /*** IDirect3D methods ***/
1227 #define IDirect3D_Initialize(p,a) ICOM_CALL2(Initialize,p,a)
1228 #define IDirect3D_EnumDevices(p,a,b) ICOM_CALL2(EnumDevices,p,a,b)
1229 #define IDirect3D_CreateLight(p,a,b) ICOM_CALL2(CreateLight,p,a,b)
1230 #define IDirect3D_CreateMaterial(p,a,b) ICOM_CALL2(CreateMaterial,p,a,b)
1231 #define IDirect3D_CreateViewport(p,a,b) ICOM_CALL2(CreateViewport,p,a,b)
1232 #define IDirect3D_FindDevice(p,a,b) ICOM_CALL2(FindDevice,p,a,b)
1235 /*****************************************************************************
1236 * IDirect3D2 interface
1238 #define ICOM_INTERFACE IDirect3D2
1239 #define IDirect3D2_METHODS \
1240 ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK,lpEnumDevicesCallback, LPVOID,lpUserArg) \
1241 ICOM_METHOD2(HRESULT,CreateLight, LPDIRECT3DLIGHT*,lplpDirect3DLight, IUnknown*,pUnkOuter) \
1242 ICOM_METHOD2(HRESULT,CreateMaterial, LPDIRECT3DMATERIAL2*,lplpDirect3DMaterial2, IUnknown*,pUnkOuter) \
1243 ICOM_METHOD2(HRESULT,CreateViewport, LPDIRECT3DVIEWPORT2*,lplpD3DViewport2, IUnknown*,pUnkOuter) \
1244 ICOM_METHOD2(HRESULT,FindDevice, LPD3DFINDDEVICESEARCH,lpD3DDFS, LPD3DFINDDEVICERESULT,lpD3DFDR) \
1245 ICOM_METHOD3(HRESULT,CreateDevice, REFCLSID,rclsid, LPDIRECTDRAWSURFACE,lpDDS, LPDIRECT3DDEVICE2*,lplpD3DDevice2)
1246 #define IDirect3D2_IMETHODS \
1249 ICOM_DEFINE(IDirect3D2
,IUnknown
)
1250 #undef ICOM_INTERFACE
1252 /*** IUnknown methods ***/
1253 #define IDirect3D2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1254 #define IDirect3D2_AddRef(p) ICOM_CALL (AddRef,p)
1255 #define IDirect3D2_Release(p) ICOM_CALL (Release,p)
1256 /*** IDirect3D2 methods ***/
1257 #define IDirect3D2_EnumDevices(p,a,b) ICOM_CALL2(EnumDevices,p,a,b)
1258 #define IDirect3D2_CreateLight(p,a,b) ICOM_CALL2(CreateLight,p,a,b)
1259 #define IDirect3D2_CreateMaterial(p,a,b) ICOM_CALL2(CreateMaterial,p,a,b)
1260 #define IDirect3D2_CreateViewport(p,a,b) ICOM_CALL2(CreateViewport,p,a,b)
1261 #define IDirect3D2_FindDevice(p,a,b) ICOM_CALL2(FindDevice,p,a,b)
1262 #define IDirect3D2_CreateDevice(p,a,b,c) ICOM_CALL3(CreateDevice,p,a,b,c)
1265 /*****************************************************************************
1266 * IDirect3D3 interface
1268 #define ICOM_INTERFACE IDirect3D3
1269 #define IDirect3D3_METHODS \
1270 ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK,lpEnumDevicesCallback, LPVOID,lpUserArg) \
1271 ICOM_METHOD2(HRESULT,CreateLight, LPDIRECT3DLIGHT*,lplpDirect3DLight, IUnknown*,pUnkOuter) \
1272 ICOM_METHOD2(HRESULT,CreateMaterial, LPDIRECT3DMATERIAL3*,lplpDirect3DMaterial3, IUnknown*,pUnkOuter) \
1273 ICOM_METHOD2(HRESULT,CreateViewport, LPDIRECT3DVIEWPORT3*,lplpD3DViewport3, IUnknown*,pUnkOuter) \
1274 ICOM_METHOD2(HRESULT,FindDevice, LPD3DFINDDEVICESEARCH,lpD3DDFS, LPD3DFINDDEVICERESULT,lpD3DFDR) \
1275 ICOM_METHOD4(HRESULT,CreateDevice, REFCLSID,rclsid,LPDIRECTDRAWSURFACE4,lpDDS, LPDIRECT3DDEVICE3*,lplpD3DDevice3,LPUNKNOWN,lpUnk) \
1276 ICOM_METHOD4(HRESULT,CreateVertexBuffer,LPD3DVERTEXBUFFERDESC,lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER*,lplpD3DVertBuf,DWORD,dwFlags,LPUNKNOWN,lpUnk) \
1277 ICOM_METHOD3(HRESULT,EnumZBufferFormats,REFCLSID,riidDevice,LPD3DENUMPIXELFORMATSCALLBACK,lpEnumCallback,LPVOID,lpContext) \
1278 ICOM_METHOD (HRESULT,EvictManagedTextures)
1279 #define IDirect3D3_IMETHODS \
1282 ICOM_DEFINE(IDirect3D3
,IUnknown
)
1283 #undef ICOM_INTERFACE
1285 /*** IUnknown methods ***/
1286 #define IDirect3D3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1287 #define IDirect3D3_AddRef(p) ICOM_CALL (AddRef,p)
1288 #define IDirect3D3_Release(p) ICOM_CALL (Release,p)
1289 /*** IDirect3D3 methods ***/
1290 #define IDirect3D3_EnumDevices(p,a,b) ICOM_CALL2(EnumDevices,p,a,b)
1291 #define IDirect3D3_CreateLight(p,a,b) ICOM_CALL2(CreateLight,p,a,b)
1292 #define IDirect3D3_CreateMaterial(p,a,b) ICOM_CALL2(CreateMaterial,p,a,b)
1293 #define IDirect3D3_CreateViewport(p,a,b) ICOM_CALL2(CreateViewport,p,a,b)
1294 #define IDirect3D3_FindDevice(p,a,b) ICOM_CALL2(FindDevice,p,a,b)
1295 #define IDirect3D3_CreateDevice(p,a,b,c,d) ICOM_CALL4(CreateDevice,p,a,b,c,d)
1296 #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) ICOM_CALL4(CreateVertexBuffer,p,a,b,c,d)
1297 #define IDirect3D3_EnumZBufferFormats(p,a,b,c) ICOM_CALL3(EnumZBufferFormats,p,a,b,c)
1298 #define IDirect3D3_EvictManagedTextures(p) ICOM_CALL0(EvictManagedTextures,p)
1301 /*****************************************************************************
1302 * IDirect3DLight interface
1304 #define ICOM_INTERFACE IDirect3DLight
1305 #define IDirect3DLight_METHODS \
1306 ICOM_METHOD1(HRESULT,Initialize, LPDIRECT3D,lpDirect3D) \
1307 ICOM_METHOD1(HRESULT,SetLight, LPD3DLIGHT,lpLight) \
1308 ICOM_METHOD1(HRESULT,GetLight, LPD3DLIGHT,lpLight)
1309 #define IDirect3DLight_IMETHODS \
1311 IDirect3DLight_METHODS
1312 ICOM_DEFINE(IDirect3DLight
,IUnknown
)
1313 #undef ICOM_INTERFACE
1315 /*** IUnknown methods ***/
1316 #define IDirect3DLight_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1317 #define IDirect3DLight_AddRef(p) ICOM_CALL (AddRef,p)
1318 #define IDirect3DLight_Release(p) ICOM_CALL (Release,p)
1319 /*** IDirect3DLight methods ***/
1320 #define IDirect3DLight_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1321 #define IDirect3DLight_SetLight(p,a) ICOM_CALL1(SetLight,p,a)
1322 #define IDirect3DLight_GetLight(p,a) ICOM_CALL1(GetLight,p,a)
1325 /*****************************************************************************
1326 * IDirect3DMaterial interface
1328 #define ICOM_INTERFACE IDirect3DMaterial
1329 #define IDirect3DMaterial_METHODS \
1330 ICOM_METHOD1(HRESULT,Initialize, LPDIRECT3D,lpDirect3D) \
1331 ICOM_METHOD1(HRESULT,SetMaterial, LPD3DMATERIAL,lpMat) \
1332 ICOM_METHOD1(HRESULT,GetMaterial, LPD3DMATERIAL,lpMat) \
1333 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE2,lpDirect3DDevice2, LPD3DMATERIALHANDLE,lpHandle) \
1334 ICOM_METHOD (HRESULT,Reserve) \
1335 ICOM_METHOD (HRESULT,Unreserve)
1336 #define IDirect3DMaterial_IMETHODS \
1338 IDirect3DMaterial_METHODS
1339 ICOM_DEFINE(IDirect3DMaterial
,IUnknown
)
1340 #undef ICOM_INTERFACE
1342 /*** IUnknown methods ***/
1343 #define IDirect3DMaterial_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1344 #define IDirect3DMaterial_AddRef(p) ICOM_CALL (AddRef,p)
1345 #define IDirect3DMaterial_Release(p) ICOM_CALL (Release,p)
1346 /*** IDirect3DMaterial methods ***/
1347 #define IDirect3DMaterial_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1348 #define IDirect3DMaterial_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
1349 #define IDirect3DMaterial_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
1350 #define IDirect3DMaterial_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
1351 #define IDirect3DMaterial_Reserve(p) ICOM_CALL (Reserve,p)
1352 #define IDirect3DMaterial_Unreserve(p) ICOM_CALL (Unreserve,p)
1355 /*****************************************************************************
1356 * IDirect3DMaterial2 interface
1358 #define ICOM_INTERFACE IDirect3DMaterial2
1359 #define IDirect3DMaterial2_METHODS \
1360 ICOM_METHOD1(HRESULT,SetMaterial, LPD3DMATERIAL,lpMat) \
1361 ICOM_METHOD1(HRESULT,GetMaterial, LPD3DMATERIAL,lpMat) \
1362 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE2,lpDirect3DDevice2, LPD3DMATERIALHANDLE,lpHandle)
1363 #define IDirect3DMaterial2_IMETHODS \
1365 IDirect3DMaterial2_METHODS
1366 ICOM_DEFINE(IDirect3DMaterial2
,IUnknown
)
1367 #undef ICOM_INTERFACE
1369 /*** IUnknown methods ***/
1370 #define IDirect3DMaterial2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1371 #define IDirect3DMaterial2_AddRef(p) ICOM_CALL (AddRef,p)
1372 #define IDirect3DMaterial2_Release(p) ICOM_CALL (Release,p)
1373 /*** IDirect3DMaterial2 methods ***/
1374 #define IDirect3DMaterial2_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
1375 #define IDirect3DMaterial2_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
1376 #define IDirect3DMaterial2_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
1379 /*****************************************************************************
1380 * IDirect3DMaterial3 interface
1382 #define ICOM_INTERFACE IDirect3DMaterial3
1383 #define IDirect3DMaterial3_METHODS \
1384 ICOM_METHOD1(HRESULT,SetMaterial, LPD3DMATERIAL,lpMat) \
1385 ICOM_METHOD1(HRESULT,GetMaterial, LPD3DMATERIAL,lpMat) \
1386 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE3,lpDirect3DDevice2, LPD3DMATERIALHANDLE,lpHandle)
1387 #define IDirect3DMaterial3_IMETHODS \
1389 IDirect3DMaterial3_METHODS
1390 ICOM_DEFINE(IDirect3DMaterial3
,IUnknown
)
1391 #undef ICOM_INTERFACE
1393 /*** IUnknown methods ***/
1394 #define IDirect3DMaterial3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1395 #define IDirect3DMaterial3_AddRef(p) ICOM_CALL (AddRef,p)
1396 #define IDirect3DMaterial3_Release(p) ICOM_CALL (Release,p)
1397 /*** IDirect3DMaterial3 methods ***/
1398 #define IDirect3DMaterial3_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
1399 #define IDirect3DMaterial3_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
1400 #define IDirect3DMaterial3_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
1403 /*****************************************************************************
1404 * IDirect3DTexture interface
1406 #define ICOM_INTERFACE IDirect3DTexture
1407 #define IDirect3DTexture_METHODS \
1408 ICOM_METHOD2(HRESULT,Initialize, LPDIRECT3DDEVICE,lpDirect3DDevice, LPDIRECTDRAWSURFACE,) \
1409 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE,lpDirect3DDevice, LPD3DTEXTUREHANDLE,) \
1410 ICOM_METHOD2(HRESULT,PaletteChanged, DWORD,dwStart, DWORD,dwCount) \
1411 ICOM_METHOD1(HRESULT,Load, LPDIRECT3DTEXTURE,lpD3DTexture) \
1412 ICOM_METHOD (HRESULT,Unload)
1413 #define IDirect3DTexture_IMETHODS \
1415 IDirect3DTexture_METHODS
1416 ICOM_DEFINE(IDirect3DTexture
,IUnknown
)
1417 #undef ICOM_INTERFACE
1419 /*** IUnknown methods ***/
1420 #define IDirect3DTexture_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1421 #define IDirect3DTexture_AddRef(p) ICOM_CALL (AddRef,p)
1422 #define IDirect3DTexture_Release(p) ICOM_CALL (Release,p)
1423 /*** IDirect3DTexture methods ***/
1424 #define IDirect3DTexture_Initialize(p,a,b,c) ICOM_CALL(Initialize,p,a,b,c)
1425 #define IDirect3DTexture_GetHandle(p,a,b,c) ICOM_CALL(GetHandle,p,a,b,c)
1426 #define IDirect3DTexture_PaletteChanged(p,a,b,c) ICOM_CALL(PaletteChanged,p,a,b,c)
1427 #define IDirect3DTexture_Load(p,a,b,c) ICOM_CALL(Load,p,a,b,c)
1428 #define IDirect3DTexture_Unload(p,a,b,c) ICOM_CALL(Unload,p,a,b,c)
1431 /*****************************************************************************
1432 * IDirect3DTexture2 interface
1434 #define ICOM_INTERFACE IDirect3DTexture2
1435 #define IDirect3DTexture2_METHODS \
1436 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE2,lpDirect3DDevice2, LPD3DTEXTUREHANDLE,lpHandle) \
1437 ICOM_METHOD2(HRESULT,PaletteChanged, DWORD,dwStart, DWORD,dwCount) \
1438 ICOM_METHOD1(HRESULT,Load, LPDIRECT3DTEXTURE2,lpD3DTexture2)
1439 #define IDirect3DTexture2_IMETHODS \
1441 IDirect3DTexture2_METHODS
1442 ICOM_DEFINE(IDirect3DTexture2
,IUnknown
)
1443 #undef ICOM_INTERFACE
1445 /*** IUnknown methods ***/
1446 #define IDirect3DTexture2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1447 #define IDirect3DTexture2_AddRef(p) ICOM_CALL (AddRef,p)
1448 #define IDirect3DTexture2_Release(p) ICOM_CALL (Release,p)
1449 /*** IDirect3DTexture2 methods ***/
1450 #define IDirect3DTexture2_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
1451 #define IDirect3DTexture2_PaletteChanged(p,a,b) ICOM_CALL2(PaletteChanged,p,a,b)
1452 #define IDirect3DTexture2_Load(p,a) ICOM_CALL1(Load,p,a)
1455 /*****************************************************************************
1456 * IDirect3DViewport interface
1458 #define ICOM_INTERFACE IDirect3DViewport
1459 #define IDirect3DViewport_METHODS \
1460 ICOM_METHOD1(HRESULT,Initialize, LPDIRECT3D,lpDirect3D) \
1461 ICOM_METHOD1(HRESULT,GetViewport, LPD3DVIEWPORT,lpData) \
1462 ICOM_METHOD1(HRESULT,SetViewport, LPD3DVIEWPORT,lpData) \
1463 ICOM_METHOD4(HRESULT,TransformVertices, DWORD,dwVertexCount, LPD3DTRANSFORMDATA,lpData, DWORD,dwFlags, LPDWORD,lpOffScreen) \
1464 ICOM_METHOD2(HRESULT,LightElements, DWORD,dwElementCount, LPD3DLIGHTDATA,lpData) \
1465 ICOM_METHOD1(HRESULT,SetBackground, D3DMATERIALHANDLE,hMat) \
1466 ICOM_METHOD2(HRESULT,GetBackground, LPD3DMATERIALHANDLE,, LPBOOL,) \
1467 ICOM_METHOD1(HRESULT,SetBackgroundDepth, LPDIRECTDRAWSURFACE,lpDDSurface) \
1468 ICOM_METHOD2(HRESULT,GetBackgroundDepth, LPDIRECTDRAWSURFACE*,lplpDDSurface, LPBOOL,lpValid) \
1469 ICOM_METHOD3(HRESULT,Clear, DWORD,dwCount, LPD3DRECT,lpRects, DWORD,dwFlags) \
1470 ICOM_METHOD1(HRESULT,AddLight, LPDIRECT3DLIGHT,lpDirect3DLight) \
1471 ICOM_METHOD1(HRESULT,DeleteLight, LPDIRECT3DLIGHT,lpDirect3DLight) \
1472 ICOM_METHOD3(HRESULT,NextLight, LPDIRECT3DLIGHT,lpDirect3DLight, LPDIRECT3DLIGHT*,lplpDirect3DLight, DWORD,dwFlags)
1473 #define IDirect3DViewport_IMETHODS \
1475 IDirect3DViewport_METHODS
1476 ICOM_DEFINE(IDirect3DViewport
,IUnknown
)
1477 #undef ICOM_INTERFACE
1479 /*** IUnknown methods ***/
1480 #define IDirect3DViewport_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1481 #define IDirect3DViewport_AddRef(p) ICOM_CALL (AddRef,p)
1482 #define IDirect3DViewport_Release(p) ICOM_CALL (Release,p)
1483 /*** IDirect3DViewport methods ***/
1484 #define IDirect3DViewport_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1485 #define IDirect3DViewport_GetViewport(p,a) ICOM_CALL1(GetViewport,p,a)
1486 #define IDirect3DViewport_SetViewport(p,a) ICOM_CALL1(SetViewport,p,a)
1487 #define IDirect3DViewport_TransformVertices(p,a,b,c,d) ICOM_CALL4(TransformVertices,p,a,b,c,d)
1488 #define IDirect3DViewport_LightElements(p,a,b) ICOM_CALL2(LightElements,p,a,b)
1489 #define IDirect3DViewport_SetBackground(p,a) ICOM_CALL1(SetBackground,p,a)
1490 #define IDirect3DViewport_GetBackground(p,a,b) ICOM_CALL2(GetBackground,p,a,b)
1491 #define IDirect3DViewport_SetBackgroundDepth(p,a) ICOM_CALL1(SetBackgroundDepth,p,a)
1492 #define IDirect3DViewport_GetBackgroundDepth(p,a,b) ICOM_CALL2(GetBackgroundDepth,p,a,b)
1493 #define IDirect3DViewport_Clear(p,a,b,c) ICOM_CALL3(Clear,p,a,b,c)
1494 #define IDirect3DViewport_AddLight(p,a) ICOM_CALL1(AddLight,p,a)
1495 #define IDirect3DViewport_DeleteLight(p,a) ICOM_CALL1(DeleteLight,p,a)
1496 #define IDirect3DViewport_NextLight(p,a,b,c) ICOM_CALL3(NextLight,p,a,b,c)
1499 /*****************************************************************************
1500 * IDirect3DViewport2 interface
1502 #define ICOM_INTERFACE IDirect3DViewport2
1503 #define IDirect3DViewport2_METHODS \
1504 ICOM_METHOD1(HRESULT,GetViewport2, LPD3DVIEWPORT2,lpData) \
1505 ICOM_METHOD1(HRESULT,SetViewport2, LPD3DVIEWPORT2,lpData)
1506 #define IDirect3DViewport2_IMETHODS \
1507 IDirect3DViewport_IMETHODS \
1508 IDirect3DViewport2_METHODS
1509 ICOM_DEFINE(IDirect3DViewport2
,IDirect3DViewport
)
1510 #undef ICOM_INTERFACE
1512 /*** IUnknown methods ***/
1513 #define IDirect3DViewport2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1514 #define IDirect3DViewport2_AddRef(p) ICOM_CALL (AddRef,p)
1515 #define IDirect3DViewport2_Release(p) ICOM_CALL (Release,p)
1516 /*** IDirect3Viewport methods ***/
1517 #define IDirect3DViewport2_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1518 #define IDirect3DViewport2_GetViewport(p,a) ICOM_CALL1(GetViewport,p,a)
1519 #define IDirect3DViewport2_SetViewport(p,a) ICOM_CALL1(SetViewport,p,a)
1520 #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) ICOM_CALL4(TransformVertices,p,a,b,c,d)
1521 #define IDirect3DViewport2_LightElements(p,a,b) ICOM_CALL2(LightElements,p,a,b)
1522 #define IDirect3DViewport2_SetBackground(p,a) ICOM_CALL1(SetBackground,p,a)
1523 #define IDirect3DViewport2_GetBackground(p,a,b) ICOM_CALL2(GetBackground,p,a,b)
1524 #define IDirect3DViewport2_SetBackgroundDepth(p,a) ICOM_CALL1(SetBackgroundDepth,p,a)
1525 #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) ICOM_CALL2(GetBackgroundDepth,p,a,b)
1526 #define IDirect3DViewport2_Clear(p,a,b,c) ICOM_CALL3(Clear,p,a,b,c)
1527 #define IDirect3DViewport2_AddLight(p,a) ICOM_CALL1(AddLight,p,a)
1528 #define IDirect3DViewport2_DeleteLight(p,a) ICOM_CALL1(DeleteLight,p,a)
1529 #define IDirect3DViewport2_NextLight(p,a,b,c) ICOM_CALL3(NextLight,p,a,b,c)
1530 /*** IDirect3DViewport2 methods ***/
1531 #define IDirect3DViewport2_GetViewport2(p,a) ICOM_CALL1(GetViewport2,p,a)
1532 #define IDirect3DViewport2_SetViewport2(p,a) ICOM_CALL1(SetViewport2,p,a)
1534 /*****************************************************************************
1535 * IDirect3DViewport3 interface
1537 #define ICOM_INTERFACE IDirect3DViewport3
1538 #define IDirect3DViewport3_METHODS \
1539 ICOM_METHOD1(HRESULT,SetBackgroundDepth2,LPDIRECTDRAWSURFACE4,lpDDS) \
1540 ICOM_METHOD2(HRESULT,GetBackgroundDepth2,LPDIRECTDRAWSURFACE4*,lplpDDS,LPBOOL,lpValid) \
1541 ICOM_METHOD6(HRESULT,Clear2,DWORD,dwCount,LPD3DRECT,lpRects,DWORD,dwFlags,DWORD,dwColor,D3DVALUE,dvZ,DWORD,dwStencil)
1542 #define IDirect3DViewport3_IMETHODS \
1543 IDirect3DViewport2_IMETHODS \
1544 IDirect3DViewport3_METHODS
1545 ICOM_DEFINE(IDirect3DViewport3
,IDirect3DViewport
)
1546 #undef ICOM_INTERFACE
1548 /*** IUnknown methods ***/
1549 #define IDirect3DViewport3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1550 #define IDirect3DViewport3_AddRef(p) ICOM_CALL (AddRef,p)
1551 #define IDirect3DViewport3_Release(p) ICOM_CALL (Release,p)
1552 /*** IDirect3Viewport methods ***/
1553 #define IDirect3DViewport3_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
1554 #define IDirect3DViewport3_GetViewport(p,a) ICOM_CALL1(GetViewport,p,a)
1555 #define IDirect3DViewport3_SetViewport(p,a) ICOM_CALL1(SetViewport,p,a)
1556 #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) ICOM_CALL4(TransformVertices,p,a,b,c,d)
1557 #define IDirect3DViewport3_LightElements(p,a,b) ICOM_CALL2(LightElements,p,a,b)
1558 #define IDirect3DViewport3_SetBackground(p,a) ICOM_CALL1(SetBackground,p,a)
1559 #define IDirect3DViewport3_GetBackground(p,a,b) ICOM_CALL2(GetBackground,p,a,b)
1560 #define IDirect3DViewport3_SetBackgroundDepth(p,a) ICOM_CALL1(SetBackgroundDepth,p,a)
1561 #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) ICOM_CALL2(GetBackgroundDepth,p,a,b)
1562 #define IDirect3DViewport3_Clear(p,a,b,c) ICOM_CALL3(Clear,p,a,b,c)
1563 #define IDirect3DViewport3_AddLight(p,a) ICOM_CALL1(AddLight,p,a)
1564 #define IDirect3DViewport3_DeleteLight(p,a) ICOM_CALL1(DeleteLight,p,a)
1565 #define IDirect3DViewport3_NextLight(p,a,b,c) ICOM_CALL3(NextLight,p,a,b,c)
1566 /*** IDirect3DViewport2 methods ***/
1567 #define IDirect3DViewport3_GetViewport3(p,a) ICOM_CALL1(GetViewport2,p,a)
1568 #define IDirect3DViewport3_SetViewport3(p,a) ICOM_CALL1(SetViewport2,p,a)
1569 /*** IDirect3DViewport3 methods ***/
1570 #define IDirect3DViewport3_SetBackgroundDepth2(p,a) ICOM_CALL1(SetBackgroundDepth2,p,a)
1571 #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) ICOM_CALL2(GetBackgroundDepth2,p,a,b)
1572 #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) ICOM_CALL7(Clear2,p,a,b,c,d,e,f)
1576 /*****************************************************************************
1577 * IDirect3DExecuteBuffer interface
1579 #define ICOM_INTERFACE IDirect3DExecuteBuffer
1580 #define IDirect3DExecuteBuffer_METHODS \
1581 ICOM_METHOD2(HRESULT,Initialize, LPDIRECT3DDEVICE,lpDirect3DDevice, LPD3DEXECUTEBUFFERDESC,lpDesc) \
1582 ICOM_METHOD1(HRESULT,Lock, LPD3DEXECUTEBUFFERDESC,lpDesc) \
1583 ICOM_METHOD (HRESULT,Unlock) \
1584 ICOM_METHOD1(HRESULT,SetExecuteData, LPD3DEXECUTEDATA,lpData) \
1585 ICOM_METHOD1(HRESULT,GetExecuteData, LPD3DEXECUTEDATA,lpData) \
1586 ICOM_METHOD4(HRESULT,Validate, LPDWORD,lpdwOffset, LPD3DVALIDATECALLBACK,lpFunc, LPVOID,lpUserArg, DWORD,dwReserved) \
1587 ICOM_METHOD1(HRESULT,Optimize, DWORD,)
1588 #define IDirect3DExecuteBuffer_IMETHODS \
1590 IDirect3DExecuteBuffer_METHODS
1591 ICOM_DEFINE(IDirect3DExecuteBuffer
,IUnknown
)
1592 #undef ICOM_INTERFACE
1594 /*** IUnknown methods ***/
1595 #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1596 #define IDirect3DExecuteBuffer_AddRef(p) ICOM_CALL (AddRef,p)
1597 #define IDirect3DExecuteBuffer_Release(p) ICOM_CALL (Release,p)
1598 /*** IDirect3DExecuteBuffer methods ***/
1599 #define IDirect3DExecuteBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
1600 #define IDirect3DExecuteBuffer_Lock(p,a) ICOM_CALL1(Lock,p,a)
1601 #define IDirect3DExecuteBuffer_Unlock(p) ICOM_CALL (Unlock,p)
1602 #define IDirect3DExecuteBuffer_SetExecuteData(p,a) ICOM_CALL1(SetExecuteData,p,a)
1603 #define IDirect3DExecuteBuffer_GetExecuteData(p,a) ICOM_CALL1(GetExecuteData,p,a)
1604 #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) ICOM_CALL4(Validate,p,a,b,c,d)
1605 #define IDirect3DExecuteBuffer_Optimize(p,a) ICOM_CALL1(Optimize,p,a)
1608 /*****************************************************************************
1609 * IDirect3DDevice interface
1611 #define ICOM_INTERFACE IDirect3DDevice
1612 #define IDirect3DDevice_METHODS \
1613 ICOM_METHOD3(HRESULT,Initialize, LPDIRECT3D,lpDirect3D, LPGUID,lpGUID, LPD3DDEVICEDESC,lpD3DDVDesc) \
1614 ICOM_METHOD2(HRESULT,GetCaps, LPD3DDEVICEDESC,lpD3DHWDevDesc, LPD3DDEVICEDESC,lpD3DHELDevDesc) \
1615 ICOM_METHOD2(HRESULT,SwapTextureHandles, LPDIRECT3DTEXTURE,lpD3Dtex1, LPDIRECT3DTEXTURE,lpD3DTex2) \
1616 ICOM_METHOD3(HRESULT,CreateExecuteBuffer, LPD3DEXECUTEBUFFERDESC,lpDesc, LPDIRECT3DEXECUTEBUFFER*,lplpDirect3DExecuteBuffer, IUnknown*,pUnkOuter) \
1617 ICOM_METHOD1(HRESULT,GetStats, LPD3DSTATS,lpD3DStats) \
1618 ICOM_METHOD3(HRESULT,Execute, LPDIRECT3DEXECUTEBUFFER,lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT,lpDirect3DViewport, DWORD,dwFlags) \
1619 ICOM_METHOD1(HRESULT,AddViewport, LPDIRECT3DVIEWPORT,lpDirect3DViewport) \
1620 ICOM_METHOD1(HRESULT,DeleteViewport, LPDIRECT3DVIEWPORT,lpDirect3DViewport) \
1621 ICOM_METHOD3(HRESULT,NextViewport, LPDIRECT3DVIEWPORT,lpDirect3DViewport, LPDIRECT3DVIEWPORT*,lplpDirect3DViewport, DWORD,dwFlags) \
1622 ICOM_METHOD4(HRESULT,Pick, LPDIRECT3DEXECUTEBUFFER,lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT,lpDirect3DViewport, DWORD,dwFlags, LPD3DRECT,lpRect) \
1623 ICOM_METHOD2(HRESULT,GetPickRecords, LPDWORD,lpCount, LPD3DPICKRECORD,lpD3DPickRec) \
1624 ICOM_METHOD2(HRESULT,EnumTextureFormats, LPD3DENUMTEXTUREFORMATSCALLBACK,lpD3DEnumTextureProc, LPVOID,lpArg) \
1625 ICOM_METHOD1(HRESULT,CreateMatrix, LPD3DMATRIXHANDLE,lpD3DMatHandle) \
1626 ICOM_METHOD2(HRESULT,SetMatrix, D3DMATRIXHANDLE,D3DMatHandle, LPD3DMATRIX,lpD3DMatrix) \
1627 ICOM_METHOD2(HRESULT,GetMatrix, D3DMATRIXHANDLE,D3DMatHandle, LPD3DMATRIX,lpD3DMatrix) \
1628 ICOM_METHOD1(HRESULT,DeleteMatrix, D3DMATRIXHANDLE,D3DMatHandle) \
1629 ICOM_METHOD (HRESULT,BeginScene) \
1630 ICOM_METHOD (HRESULT,EndScene) \
1631 ICOM_METHOD1(HRESULT,GetDirect3D, LPDIRECT3D*,lplpDirect3D)
1632 #define IDirect3DDevice_IMETHODS \
1634 IDirect3DDevice_METHODS
1635 ICOM_DEFINE(IDirect3DDevice
,IUnknown
)
1636 #undef ICOM_INTERFACE
1638 /*** IUnknown methods ***/
1639 #define IDirect3DDevice_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1640 #define IDirect3DDevice_AddRef(p) ICOM_CALL (AddRef,p)
1641 #define IDirect3DDevice_Release(p) ICOM_CALL (Release,p)
1642 /*** IDirect3DDevice methods ***/
1643 #define IDirect3DDevice_Initialize(p,a,b,c) ICOM_CALL3(Initialize,p,a,b,c)
1644 #define IDirect3DDevice_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1645 #define IDirect3DDevice_SwapTextureHandles(p,a,b) ICOM_CALL2(SwapTextureHandles,p,a,b)
1646 #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) ICOM_CALL3(CreateExecuteBuffer,p,a,b,c)
1647 #define IDirect3DDevice_GetStats(p,a) ICOM_CALL1(GetStats,p,a)
1648 #define IDirect3DDevice_Execute(p,a,b,c) ICOM_CALL3(Execute,p,a,b,c)
1649 #define IDirect3DDevice_AddViewport(p,a) ICOM_CALL1(AddViewport,p,a)
1650 #define IDirect3DDevice_DeleteViewport(p,a) ICOM_CALL1(DeleteViewport,p,a)
1651 #define IDirect3DDevice_NextViewport(p,a,b,c) ICOM_CALL3(NextViewport,p,a,b,c)
1652 #define IDirect3DDevice_Pick(p,a,b,c,d) ICOM_CALL4(Pick,p,a,b,c,d)
1653 #define IDirect3DDevice_GetPickRecords(p,a,b) ICOM_CALL2(GetPickRecords,p,a,b)
1654 #define IDirect3DDevice_EnumTextureFormats(p,a,b) ICOM_CALL2(EnumTextureFormats,p,a,b)
1655 #define IDirect3DDevice_CreateMatrix(p,a) ICOM_CALL1(CreateMatrix,p,a)
1656 #define IDirect3DDevice_SetMatrix(p,a,b) ICOM_CALL2(SetMatrix,p,a,b)
1657 #define IDirect3DDevice_GetMatrix(p,a,b) ICOM_CALL2(GetMatrix,p,a,b)
1658 #define IDirect3DDevice_DeleteMatrix(p,a) ICOM_CALL1(DeleteMatrix,p,a)
1659 #define IDirect3DDevice_BeginScene(p) ICOM_CALL (BeginScene,p)
1660 #define IDirect3DDevice_EndScene(p) ICOM_CALL (EndScene,p)
1661 #define IDirect3DDevice_GetDirect3D(p,a) ICOM_CALL1(GetDirect3D,p,a)
1664 /*****************************************************************************
1665 * IDirect3DDevice2 interface
1667 #define ICOM_INTERFACE IDirect3DDevice2
1668 #define IDirect3DDevice2_METHODS \
1669 ICOM_METHOD2(HRESULT,GetCaps, LPD3DDEVICEDESC,lpD3DHWDevDesc, LPD3DDEVICEDESC,lpD3DHELDevDesc) \
1670 ICOM_METHOD2(HRESULT,SwapTextureHandles, LPDIRECT3DTEXTURE2,lpD3DTex1, LPDIRECT3DTEXTURE2,lpD3DTex2) \
1671 ICOM_METHOD1(HRESULT,GetStats, LPD3DSTATS,lpD3DStats) \
1672 ICOM_METHOD1(HRESULT,AddViewport, LPDIRECT3DVIEWPORT2,lpDirect3DViewport2) \
1673 ICOM_METHOD1(HRESULT,DeleteViewport, LPDIRECT3DVIEWPORT2,lpDirect3DViewport2) \
1674 ICOM_METHOD3(HRESULT,NextViewport, LPDIRECT3DVIEWPORT2,lpDirect3DViewport2, LPDIRECT3DVIEWPORT2*,lplpDirect3DViewport2, DWORD,dwFlags) \
1675 ICOM_METHOD2(HRESULT,EnumTextureFormats, LPD3DENUMTEXTUREFORMATSCALLBACK,lpD3DEnumTextureProc, LPVOID,lpArg) \
1676 ICOM_METHOD (HRESULT,BeginScene) \
1677 ICOM_METHOD (HRESULT,EndScene) \
1678 ICOM_METHOD1(HRESULT,GetDirect3D, LPDIRECT3D2*,lplpDirect3D2) \
1679 /*** DrawPrimitive API ***/ \
1680 ICOM_METHOD1(HRESULT,SetCurrentViewport, LPDIRECT3DVIEWPORT2,lpDirect3DViewport2) \
1681 ICOM_METHOD1(HRESULT,GetCurrentViewport, LPDIRECT3DVIEWPORT2*,lplpDirect3DViewport2) \
1682 ICOM_METHOD2(HRESULT,SetRenderTarget, LPDIRECTDRAWSURFACE,lpNewRenderTarget, DWORD,dwFlags) \
1683 ICOM_METHOD1(HRESULT,GetRenderTarget, LPDIRECTDRAWSURFACE*,lplpRenderTarget) \
1684 ICOM_METHOD3(HRESULT,Begin, D3DPRIMITIVETYPE,, D3DVERTEXTYPE,, DWORD,) \
1685 ICOM_METHOD5(HRESULT,BeginIndexed, D3DPRIMITIVETYPE,d3dptPrimitiveType, D3DVERTEXTYPE,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwNumVertices, DWORD,dwFlags) \
1686 ICOM_METHOD1(HRESULT,Vertex, LPVOID,lpVertexType) \
1687 ICOM_METHOD1(HRESULT,Index, WORD,wVertexIndex) \
1688 ICOM_METHOD1(HRESULT,End, DWORD,dwFlags) \
1689 ICOM_METHOD2(HRESULT,GetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, LPDWORD,lpdwRenderState) \
1690 ICOM_METHOD2(HRESULT,SetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, DWORD,dwRenderState) \
1691 ICOM_METHOD2(HRESULT,GetLightState, D3DLIGHTSTATETYPE,dwLightStateType, LPDWORD,lpdwLightState) \
1692 ICOM_METHOD2(HRESULT,SetLightState, D3DLIGHTSTATETYPE,dwLightStateType, DWORD,dwLightState) \
1693 ICOM_METHOD2(HRESULT,SetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
1694 ICOM_METHOD2(HRESULT,GetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
1695 ICOM_METHOD2(HRESULT,MultiplyTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
1696 ICOM_METHOD5(HRESULT,DrawPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, D3DVERTEXTYPE,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, DWORD,dwFlags) \
1697 ICOM_METHOD7(HRESULT,DrawIndexedPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, D3DVERTEXTYPE,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, LPWORD,dwIndices, DWORD,dwIndexCount, DWORD,dwFlags) \
1698 ICOM_METHOD1(HRESULT,SetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
1699 ICOM_METHOD1(HRESULT,GetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus)
1700 #define IDirect3DDevice2_IMETHODS \
1702 IDirect3DDevice2_METHODS
1703 ICOM_DEFINE(IDirect3DDevice2
,IUnknown
)
1704 #undef ICOM_INTERFACE
1706 /*** IUnknown methods ***/
1707 #define IDirect3DDevice2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1708 #define IDirect3DDevice2_AddRef(p) ICOM_CALL (AddRef,p)
1709 #define IDirect3DDevice2_Release(p) ICOM_CALL (Release,p)
1710 /*** IDirect3DDevice2 methods ***/
1711 #define IDirect3DDevice2_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1712 #define IDirect3DDevice2_SwapTextureHandles(p,a,b) ICOM_CALL2(SwapTextureHandles,p,a,b)
1713 #define IDirect3DDevice2_GetStats(p,a) ICOM_CALL1(GetStats,p,a)
1714 #define IDirect3DDevice2_AddViewport(p,a) ICOM_CALL1(AddViewport,p,a)
1715 #define IDirect3DDevice2_DeleteViewport(p,a) ICOM_CALL1(DeleteViewport,p,a)
1716 #define IDirect3DDevice2_NextViewport(p,a,b,c) ICOM_CALL3(NextViewport,p,a,b,c)
1717 #define IDirect3DDevice2_EnumTextureFormats(p,a,b) ICOM_CALL2(EnumTextureFormats,p,a,b)
1718 #define IDirect3DDevice2_BeginScene(p) ICOM_CALL (BeginScene,p)
1719 #define IDirect3DDevice2_EndScene(p) ICOM_CALL (EndScene,p)
1720 #define IDirect3DDevice2_GetDirect3D(p,a) ICOM_CALL1(GetDirect3D,p,a)
1721 #define IDirect3DDevice2_SetCurrentViewport(p,a) ICOM_CALL1(SetCurrentViewport,p,a)
1722 #define IDirect3DDevice2_GetCurrentViewport(p,a) ICOM_CALL1(GetCurrentViewport,p,a)
1723 #define IDirect3DDevice2_SetRenderTarget(p,a,b) ICOM_CALL2(SetRenderTarget,p,a,b)
1724 #define IDirect3DDevice2_GetRenderTarget(p,a) ICOM_CALL1(GetRenderTarget,p,a)
1725 #define IDirect3DDevice2_Begin(p,a,b,c) ICOM_CALL3(Begin,p,a,b,c)
1726 #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) ICOM_CALL5(BeginIndexed,p,a,b,c,d,e)
1727 #define IDirect3DDevice2_Vertex(p,a) ICOM_CALL1(Vertex,p,a)
1728 #define IDirect3DDevice2_Index(p,a) ICOM_CALL1(Index,p,a)
1729 #define IDirect3DDevice2_End(p,a) ICOM_CALL1(End,p,a)
1730 #define IDirect3DDevice2_GetRenderState(p,a,b) ICOM_CALL2(GetRenderState,p,a,b)
1731 #define IDirect3DDevice2_SetRenderState(p,a,b) ICOM_CALL2(SetRenderState,p,a,b)
1732 #define IDirect3DDevice2_GetLightState(p,a,b) ICOM_CALL2(GetLightState,p,a,b)
1733 #define IDirect3DDevice2_SetLightState(p,a,b) ICOM_CALL2(SetLightState,p,a,b)
1734 #define IDirect3DDevice2_SetTransform(p,a,b) ICOM_CALL2(SetTransform,p,a,b)
1735 #define IDirect3DDevice2_GetTransform(p,a,b) ICOM_CALL2(GetTransform,p,a,b)
1736 #define IDirect3DDevice2_MultiplyTransform(p,a,b) ICOM_CALL2(MultiplyTransform,p,a,b)
1737 #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitive,p,a,b,c,d,e)
1738 #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitive,p,a,b,c,d,e,f,g)
1739 #define IDirect3DDevice2_SetClipStatus(p,a) ICOM_CALL1(SetClipStatus,p,a)
1740 #define IDirect3DDevice2_GetClipStatus(p,a) ICOM_CALL1(GetClipStatus,p,a)
1742 /*****************************************************************************
1743 * IDirect3DDevice3 interface
1745 #define ICOM_INTERFACE IDirect3DDevice3
1746 #define IDirect3DDevice3_METHODS \
1747 ICOM_METHOD2(HRESULT,GetCaps, LPD3DDEVICEDESC,lpD3DHWDevDesc, LPD3DDEVICEDESC,lpD3DHELDevDesc) \
1748 ICOM_METHOD1(HRESULT,GetStats, LPD3DSTATS,lpD3DStats) \
1749 ICOM_METHOD1(HRESULT,AddViewport, LPDIRECT3DVIEWPORT3,lpDirect3DViewport3) \
1750 ICOM_METHOD1(HRESULT,DeleteViewport, LPDIRECT3DVIEWPORT3,lpDirect3DViewport3) \
1751 ICOM_METHOD3(HRESULT,NextViewport, LPDIRECT3DVIEWPORT3,lpDirect3DViewport3, LPDIRECT3DVIEWPORT3*,lplpDirect3DViewport3, DWORD,dwFlags) \
1752 ICOM_METHOD2(HRESULT,EnumTextureFormats, LPD3DENUMPIXELFORMATSCALLBACK,lpD3DEnumPixelProc, LPVOID,lpArg) \
1753 ICOM_METHOD (HRESULT,BeginScene) \
1754 ICOM_METHOD (HRESULT,EndScene) \
1755 ICOM_METHOD1(HRESULT,GetDirect3D, LPDIRECT3D3*,lplpDirect3D3) \
1756 /*** DrawPrimitive API ***/ \
1757 ICOM_METHOD1(HRESULT,SetCurrentViewport, LPDIRECT3DVIEWPORT3,lpDirect3DViewport3) \
1758 ICOM_METHOD1(HRESULT,GetCurrentViewport, LPDIRECT3DVIEWPORT3*,lplpDirect3DViewport3) \
1759 ICOM_METHOD2(HRESULT,SetRenderTarget, LPDIRECTDRAWSURFACE,lpNewRenderTarget, DWORD,dwFlags) \
1760 ICOM_METHOD1(HRESULT,GetRenderTarget, LPDIRECTDRAWSURFACE*,lplpRenderTarget) \
1761 ICOM_METHOD3(HRESULT,Begin, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexTypeDesc, DWORD,dwFlags) \
1762 ICOM_METHOD5(HRESULT,BeginIndexed, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwNumVertices, DWORD,dwFlags) \
1763 ICOM_METHOD1(HRESULT,Vertex, LPVOID,lpVertexType) \
1764 ICOM_METHOD1(HRESULT,Index, WORD,wVertexIndex) \
1765 ICOM_METHOD1(HRESULT,End, DWORD,dwFlags) \
1766 ICOM_METHOD2(HRESULT,GetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, LPDWORD,lpdwRenderState) \
1767 ICOM_METHOD2(HRESULT,SetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, DWORD,dwRenderState) \
1768 ICOM_METHOD2(HRESULT,GetLightState, D3DLIGHTSTATETYPE,dwLightStateType, LPDWORD,lpdwLightState) \
1769 ICOM_METHOD2(HRESULT,SetLightState, D3DLIGHTSTATETYPE,dwLightStateType, DWORD,dwLightState) \
1770 ICOM_METHOD2(HRESULT,SetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
1771 ICOM_METHOD2(HRESULT,GetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
1772 ICOM_METHOD2(HRESULT,MultiplyTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
1773 ICOM_METHOD5(HRESULT,DrawPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, DWORD,dwFlags) \
1774 ICOM_METHOD7(HRESULT,DrawIndexedPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, LPWORD,dwIndices, DWORD,dwIndexCount, DWORD,dwFlags) \
1775 ICOM_METHOD1(HRESULT,SetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
1776 ICOM_METHOD1(HRESULT,GetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
1777 ICOM_METHOD5(HRESULT,DrawPrimitiveStrided, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA,lpD3DDrawPrimStrideData,DWORD,dwVertexCount,DWORD,dwFlags) \
1778 ICOM_METHOD7(HRESULT,DrawIndexedPrimitiveStrided, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA,lpD3DDrawPrimStrideData,DWORD,dwVertexCount,LPWORD,lpIndex,DWORD,dwIndexCount,DWORD,dwFlags) \
1779 ICOM_METHOD5(HRESULT,DrawPrimitiveVB, D3DPRIMITIVETYPE,d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER,lpD3DVertexBuf,DWORD,dwStartVertex,DWORD,dwNumVertices,DWORD,dwFlags) \
1780 ICOM_METHOD5(HRESULT,DrawIndexedPrimitiveVB, D3DPRIMITIVETYPE,d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER,lpD3DVertexBuf,LPWORD,lpwIndices,DWORD,dwIndexCount,DWORD,dwFlags) \
1781 ICOM_METHOD5(HRESULT,ComputeSphereVisibility, LPD3DVECTOR,lpCenters,LPD3DVALUE,lpRadii,DWORD,dwNumSpheres,DWORD,dwFlags,LPDWORD,lpdwReturnValues) \
1782 ICOM_METHOD2(HRESULT,GetTexture, DWORD,dwStage,LPDIRECT3DTEXTURE2*,lplpTexture2) \
1783 ICOM_METHOD2(HRESULT,SetTexture, DWORD,dwStage,LPDIRECT3DTEXTURE2,lpTexture2) \
1784 ICOM_METHOD3(HRESULT,GetTextureStageState, DWORD,dwStage,D3DTEXTURESTAGESTATETYPE,d3dTexStageStateType,LPDWORD,lpdwState) \
1785 ICOM_METHOD3(HRESULT,SetTextureStageState, DWORD,dwStage,D3DTEXTURESTAGESTATETYPE,d3dTexStageStateType,DWORD,dwState) \
1786 ICOM_METHOD1(HRESULT,ValidateDevice, LPDWORD,lpdwPasses)
1787 #define IDirect3DDevice3_IMETHODS \
1789 IDirect3DDevice3_METHODS
1790 ICOM_DEFINE(IDirect3DDevice3
,IUnknown
)
1791 #undef ICOM_INTERFACE
1793 /*** IUnknown methods ***/
1794 #define IDirect3DDevice3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1795 #define IDirect3DDevice3_AddRef(p) ICOM_CALL (AddRef,p)
1796 #define IDirect3DDevice3_Release(p) ICOM_CALL (Release,p)
1797 /*** IDirect3DDevice3 methods ***/
1798 #define IDirect3DDevice3_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
1799 #define IDirect3DDevice3_GetStats(p,a) ICOM_CALL1(GetStats,p,a)
1800 #define IDirect3DDevice3_AddViewport(p,a) ICOM_CALL1(AddViewport,p,a)
1801 #define IDirect3DDevice3_DeleteViewport(p,a) ICOM_CALL1(DeleteViewport,p,a)
1802 #define IDirect3DDevice3_NextViewport(p,a,b,c) ICOM_CALL3(NextViewport,p,a,b,c)
1803 #define IDirect3DDevice3_EnumTextureFormats(p,a,b) ICOM_CALL2(EnumTextureFormats,p,a,b)
1804 #define IDirect3DDevice3_BeginScene(p) ICOM_CALL (BeginScene,p)
1805 #define IDirect3DDevice3_EndScene(p) ICOM_CALL (EndScene,p)
1806 #define IDirect3DDevice3_GetDirect3D(p,a) ICOM_CALL1(GetDirect3D,p,a)
1807 #define IDirect3DDevice3_SetCurrentViewport(p,a) ICOM_CALL1(SetCurrentViewport,p,a)
1808 #define IDirect3DDevice3_GetCurrentViewport(p,a) ICOM_CALL1(GetCurrentViewport,p,a)
1809 #define IDirect3DDevice3_SetRenderTarget(p,a,b) ICOM_CALL2(SetRenderTarget,p,a,b)
1810 #define IDirect3DDevice3_GetRenderTarget(p,a) ICOM_CALL1(GetRenderTarget,p,a)
1811 #define IDirect3DDevice3_Begin(p,a,b,c) ICOM_CALL3(Begin,p,a,b,c)
1812 #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) ICOM_CALL5(BeginIndexed,p,a,b,c,d,e)
1813 #define IDirect3DDevice3_Vertex(p,a) ICOM_CALL1(Vertex,p,a)
1814 #define IDirect3DDevice3_Index(p,a) ICOM_CALL1(Index,p,a)
1815 #define IDirect3DDevice3_End(p,a) ICOM_CALL1(End,p,a)
1816 #define IDirect3DDevice3_GetRenderState(p,a,b) ICOM_CALL2(GetRenderState,p,a,b)
1817 #define IDirect3DDevice3_SetRenderState(p,a,b) ICOM_CALL2(SetRenderState,p,a,b)
1818 #define IDirect3DDevice3_GetLightState(p,a,b) ICOM_CALL2(GetLightState,p,a,b)
1819 #define IDirect3DDevice3_SetLightState(p,a,b) ICOM_CALL2(SetLightState,p,a,b)
1820 #define IDirect3DDevice3_SetTransform(p,a,b) ICOM_CALL2(SetTransform,p,a,b)
1821 #define IDirect3DDevice3_GetTransform(p,a,b) ICOM_CALL2(GetTransform,p,a,b)
1822 #define IDirect3DDevice3_MultiplyTransform(p,a,b) ICOM_CALL2(MultiplyTransform,p,a,b)
1823 #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitive,p,a,b,c,d,e)
1824 #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitive,p,a,b,c,d,e,f,g)
1825 #define IDirect3DDevice3_SetClipStatus(p,a) ICOM_CALL1(SetClipStatus,p,a)
1826 #define IDirect3DDevice3_GetClipStatus(p,a) ICOM_CALL1(GetClipStatus,p,a)
1827 #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitiveStrided,p,a,b,c,d,e)
1828 #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitiveStrided,p,a,b,c,d,e,f,g)
1829 #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitiveVB,p,a,b,c,d,e)
1830 #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) ICOM_CALL5(DrawIndexedPrimitiveVB,p,a,b,c,d,e)
1831 #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) ICOM_CALL5(ComputeSphereVisibility,p,a,b,c,d,e)
1832 #define IDirect3DDevice3_GetTexture(p,a,b) ICOM_CALL2(GetTexture,p,a,b)
1833 #define IDirect3DDevice3_SetTexture(p,a,b) ICOM_CALL2(SetTexture,p,a,b)
1834 #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) ICOM_CALL3(GetTextureStageState,p,a,b,c)
1835 #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) ICOM_CALL3(SetTextureStageState,p,a,b,c)
1836 #define IDirect3DDevice3_ValidateDevice(p,a) ICOM_CALL1(ValidateDevice,p,a)
1839 /*****************************************************************************
1840 * IDirect3DVertexBuffer interface
1842 #define ICOM_INTERFACE IDirect3DVertexBuffer
1843 #define IDirect3DVertexBuffer_METHODS \
1844 ICOM_METHOD3(HRESULT,Lock, DWORD,dwFlags,LPVOID*,lplpData,LPDWORD,lpdwSize) \
1845 ICOM_METHOD (HRESULT,Unlock) \
1846 ICOM_METHOD7(HRESULT,ProcessVertices, DWORD,dwVertexOp,DWORD,dwDestIndex,DWORD,dwCount,LPDIRECT3DVERTEXBUFFER,lpSrcBuffer,DWORD,dwSrcIndex,LPDIRECT3DDEVICE3,lpD3DDevice,DWORD,dwFlags) \
1847 ICOM_METHOD1(HRESULT,GetVertexBufferDesc, LPD3DVERTEXBUFFERDESC,lpD3DVertexBufferDesc) \
1848 ICOM_METHOD2(HRESULT,Optimize, LPDIRECT3DDEVICE3, lpD3DDevice,DWORD,dwFlags)
1849 #define IDirect3DVertexBuffer_IMETHODS \
1851 IDirect3DVertexBuffer_METHODS
1852 ICOM_DEFINE(IDirect3DVertexBuffer
,IUnknown
)
1853 #undef ICOM_INTERFACE
1855 /*** IUnknown methods ***/
1856 #define IDirect3DVertexBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
1857 #define IDirect3DVertexBuffer_AddRef(p) ICOM_CALL (AddRef,p)
1858 #define IDirect3DVertexBuffer_Release(p) ICOM_CALL (Release,p)
1859 /*** IDirect3DVertexBuffer methods ***/
1860 #define IDirect3DVertexBuffer_Lock(p,a,b,c) ICOM_CALL3(Lock,p,a,b,c)
1861 #define IDirect3DVertexBuffer_Unlock(p) ICOM_CALL (Unlock,p)
1862 #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) ICOM_CALL7(ProcessVertices,p,a,b,c,d,e,f,g)
1863 #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) ICOM_CALL1(GetVertexBufferDesc,p,a)
1864 #define IDirect3DVertexBuffer_Optimize(p,a,b) ICOM_CALL2(Optimize,p,a,b)
1867 #endif /* __WINE_D3D_H */