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