Separate GetTextMetrics and implement it for SBCS/Unicode/cp932.
[wine.git] / include / d3d.h
blobd34b478d55d59d2f0b3254d64b43c80f11ddc764
1 #ifndef __WINE_D3D_H
2 #define __WINE_D3D_H
4 #include "ddraw.h"
5 #include "d3dtypes.h" /* must precede d3dcaps.h */
6 #include "d3dcaps.h"
8 /*****************************************************************************
9 * Predeclare the interfaces
11 DEFINE_GUID(IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
12 DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
13 DEFINE_GUID(IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
14 DEFINE_GUID(IID_IDirect3D7, 0xf5049e77,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
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);
20 DEFINE_GUID(IID_IDirect3DRefDevice, 0x50936643,0x13e9,0x11d1,0x89,0xaa,0x00,0xa0,0xc9,0x05,0x41,0x29);
21 DEFINE_GUID(IID_IDirect3DTnLHalDevice, 0xf5049e78,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
23 DEFINE_GUID(IID_IDirect3DDevice, 0x64108800,0x957d,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
24 DEFINE_GUID(IID_IDirect3DDevice2, 0x93281501,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
25 DEFINE_GUID(IID_IDirect3DDevice3, 0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
26 DEFINE_GUID(IID_IDirect3DDevice7, 0xf5049e79,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
28 DEFINE_GUID(IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
29 DEFINE_GUID(IID_IDirect3DTexture2, 0x93281502,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
31 DEFINE_GUID(IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
33 DEFINE_GUID(IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
34 DEFINE_GUID(IID_IDirect3DMaterial2, 0x93281503,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
35 DEFINE_GUID(IID_IDirect3DMaterial3, 0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x00,0x60,0x08,0x52,0xb3,0x12);
37 DEFINE_GUID(IID_IDirect3DExecuteBuffer, 0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
39 DEFINE_GUID(IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
40 DEFINE_GUID(IID_IDirect3DViewport2, 0x93281500,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
41 DEFINE_GUID(IID_IDirect3DViewport3, 0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
43 DEFINE_GUID(IID_IDirect3DVertexBuffer, 0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x00,0xa0,0xc9,0x03,0x67,0xf8);
44 DEFINE_GUID(IID_IDirect3DVertexBuffer7, 0xf5049e7d,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
47 typedef struct IDirect3D IDirect3D ,*LPDIRECT3D;
48 typedef struct IDirect3D2 IDirect3D2,*LPDIRECT3D2;
49 typedef struct IDirect3D3 IDirect3D3,*LPDIRECT3D3;
50 typedef struct IDirect3D7 IDirect3D7,*LPDIRECT3D7;
52 typedef struct IDirect3DLight IDirect3DLight,*LPDIRECT3DLIGHT;
54 typedef struct IDirect3DDevice IDirect3DDevice, *LPDIRECT3DDEVICE;
55 typedef struct IDirect3DDevice2 IDirect3DDevice2, *LPDIRECT3DDEVICE2;
56 typedef struct IDirect3DDevice3 IDirect3DDevice3, *LPDIRECT3DDEVICE3;
57 typedef struct IDirect3DDevice7 IDirect3DDevice7, *LPDIRECT3DDEVICE7;
59 typedef struct IDirect3DViewport IDirect3DViewport, *LPDIRECT3DVIEWPORT;
60 typedef struct IDirect3DViewport2 IDirect3DViewport2, *LPDIRECT3DVIEWPORT2;
61 typedef struct IDirect3DViewport3 IDirect3DViewport3, *LPDIRECT3DVIEWPORT3;
63 typedef struct IDirect3DMaterial IDirect3DMaterial, *LPDIRECT3DMATERIAL;
64 typedef struct IDirect3DMaterial2 IDirect3DMaterial2, *LPDIRECT3DMATERIAL2;
65 typedef struct IDirect3DMaterial3 IDirect3DMaterial3, *LPDIRECT3DMATERIAL3;
67 typedef struct IDirect3DTexture IDirect3DTexture, *LPDIRECT3DTEXTURE;
68 typedef struct IDirect3DTexture2 IDirect3DTexture2, *LPDIRECT3DTEXTURE2;
70 typedef struct IDirect3DExecuteBuffer IDirect3DExecuteBuffer, *LPDIRECT3DEXECUTEBUFFER;
72 typedef struct IDirect3DVertexBuffer IDirect3DVertexBuffer, *LPDIRECT3DVERTEXBUFFER;
73 typedef struct IDirect3DVertexBuffer7 IDirect3DVertexBuffer7, *LPDIRECT3DVERTEXBUFFER7;
75 /* ********************************************************************
76 Error Codes
77 ******************************************************************** */
78 #define D3D_OK DD_OK
79 #define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
80 #define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
81 #define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
82 #define D3DERR_INITFAILED MAKE_DDHRESULT(706)
83 #define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
84 #define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
85 #define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
86 #define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
87 #define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
88 #define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
89 #define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
90 #define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
91 #define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
92 #define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
93 #define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
94 #define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
95 #define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
96 #define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
97 #define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
98 #define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
99 #define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
100 #define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
101 #define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
102 #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
103 #define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
104 #define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
105 #define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
106 #define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
107 #define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
108 #define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
109 #define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
110 #define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
111 #define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
112 #define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
113 #define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
114 #define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
115 #define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
116 #define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
117 #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
118 #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
119 #define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
120 #define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
121 #define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
122 #define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
123 #define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
124 #define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
125 #define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
126 #define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
127 #define D3DERR_INBEGIN MAKE_DDHRESULT(770)
128 #define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
129 #define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
130 #define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
131 #define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
132 #define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
134 /* ********************************************************************
135 Enums
136 ******************************************************************** */
137 #define D3DNEXT_NEXT 0x01l
138 #define D3DNEXT_HEAD 0x02l
139 #define D3DNEXT_TAIL 0x04l
141 /* ********************************************************************
142 Types and structures
143 ******************************************************************** */
144 typedef DWORD D3DVIEWPORTHANDLE, *LPD3DVIEWPORTHANDLE;
147 /*****************************************************************************
148 * IDirect3D interface
150 #define ICOM_INTERFACE IDirect3D
151 #define IDirect3D_METHODS \
152 ICOM_METHOD1(HRESULT,Initialize, REFIID,riid) \
153 ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK,lpEnumDevicesCallback, LPVOID,lpUserArg) \
154 ICOM_METHOD2(HRESULT,CreateLight, LPDIRECT3DLIGHT*,lplpDirect3DLight, IUnknown*,pUnkOuter) \
155 ICOM_METHOD2(HRESULT,CreateMaterial, LPDIRECT3DMATERIAL*,lplpDirect3DMaterial, IUnknown*,pUnkOuter) \
156 ICOM_METHOD2(HRESULT,CreateViewport, LPDIRECT3DVIEWPORT*,lplpD3DViewport, IUnknown*,pUnkOuter) \
157 ICOM_METHOD2(HRESULT,FindDevice, LPD3DFINDDEVICESEARCH,lpD3DDFS, LPD3DFINDDEVICERESULT,lplpD3DDevice)
158 #define IDirect3D_IMETHODS \
159 IUnknown_IMETHODS \
160 IDirect3D_METHODS
161 ICOM_DEFINE(IDirect3D,IUnknown)
162 #undef ICOM_INTERFACE
164 /*** IUnknown methods ***/
165 #define IDirect3D_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
166 #define IDirect3D_AddRef(p) ICOM_CALL (AddRef,p)
167 #define IDirect3D_Release(p) ICOM_CALL (Release,p)
168 /*** IDirect3D methods ***/
169 #define IDirect3D_Initialize(p,a) ICOM_CALL2(Initialize,p,a)
170 #define IDirect3D_EnumDevices(p,a,b) ICOM_CALL2(EnumDevices,p,a,b)
171 #define IDirect3D_CreateLight(p,a,b) ICOM_CALL2(CreateLight,p,a,b)
172 #define IDirect3D_CreateMaterial(p,a,b) ICOM_CALL2(CreateMaterial,p,a,b)
173 #define IDirect3D_CreateViewport(p,a,b) ICOM_CALL2(CreateViewport,p,a,b)
174 #define IDirect3D_FindDevice(p,a,b) ICOM_CALL2(FindDevice,p,a,b)
177 /*****************************************************************************
178 * IDirect3D2 interface
180 #define ICOM_INTERFACE IDirect3D2
181 #define IDirect3D2_METHODS \
182 ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK,lpEnumDevicesCallback, LPVOID,lpUserArg) \
183 ICOM_METHOD2(HRESULT,CreateLight, LPDIRECT3DLIGHT*,lplpDirect3DLight, IUnknown*,pUnkOuter) \
184 ICOM_METHOD2(HRESULT,CreateMaterial, LPDIRECT3DMATERIAL2*,lplpDirect3DMaterial2, IUnknown*,pUnkOuter) \
185 ICOM_METHOD2(HRESULT,CreateViewport, LPDIRECT3DVIEWPORT2*,lplpD3DViewport2, IUnknown*,pUnkOuter) \
186 ICOM_METHOD2(HRESULT,FindDevice, LPD3DFINDDEVICESEARCH,lpD3DDFS, LPD3DFINDDEVICERESULT,lpD3DFDR) \
187 ICOM_METHOD3(HRESULT,CreateDevice, REFCLSID,rclsid, LPDIRECTDRAWSURFACE,lpDDS, LPDIRECT3DDEVICE2*,lplpD3DDevice2)
188 #define IDirect3D2_IMETHODS \
189 IUnknown_IMETHODS \
190 IDirect3D2_METHODS
191 ICOM_DEFINE(IDirect3D2,IUnknown)
192 #undef ICOM_INTERFACE
194 /*** IUnknown methods ***/
195 #define IDirect3D2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
196 #define IDirect3D2_AddRef(p) ICOM_CALL (AddRef,p)
197 #define IDirect3D2_Release(p) ICOM_CALL (Release,p)
198 /*** IDirect3D2 methods ***/
199 #define IDirect3D2_EnumDevices(p,a,b) ICOM_CALL2(EnumDevices,p,a,b)
200 #define IDirect3D2_CreateLight(p,a,b) ICOM_CALL2(CreateLight,p,a,b)
201 #define IDirect3D2_CreateMaterial(p,a,b) ICOM_CALL2(CreateMaterial,p,a,b)
202 #define IDirect3D2_CreateViewport(p,a,b) ICOM_CALL2(CreateViewport,p,a,b)
203 #define IDirect3D2_FindDevice(p,a,b) ICOM_CALL2(FindDevice,p,a,b)
204 #define IDirect3D2_CreateDevice(p,a,b,c) ICOM_CALL3(CreateDevice,p,a,b,c)
207 /*****************************************************************************
208 * IDirect3D3 interface
210 #define ICOM_INTERFACE IDirect3D3
211 #define IDirect3D3_METHODS \
212 ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK,lpEnumDevicesCallback, LPVOID,lpUserArg) \
213 ICOM_METHOD2(HRESULT,CreateLight, LPDIRECT3DLIGHT*,lplpDirect3DLight, IUnknown*,pUnkOuter) \
214 ICOM_METHOD2(HRESULT,CreateMaterial, LPDIRECT3DMATERIAL3*,lplpDirect3DMaterial3, IUnknown*,pUnkOuter) \
215 ICOM_METHOD2(HRESULT,CreateViewport, LPDIRECT3DVIEWPORT3*,lplpD3DViewport3, IUnknown*,pUnkOuter) \
216 ICOM_METHOD2(HRESULT,FindDevice, LPD3DFINDDEVICESEARCH,lpD3DDFS, LPD3DFINDDEVICERESULT,lpD3DFDR) \
217 ICOM_METHOD4(HRESULT,CreateDevice, REFCLSID,rclsid,LPDIRECTDRAWSURFACE4,lpDDS, LPDIRECT3DDEVICE3*,lplpD3DDevice3,LPUNKNOWN,lpUnk) \
218 ICOM_METHOD4(HRESULT,CreateVertexBuffer,LPD3DVERTEXBUFFERDESC,lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER*,lplpD3DVertBuf,DWORD,dwFlags,LPUNKNOWN,lpUnk) \
219 ICOM_METHOD3(HRESULT,EnumZBufferFormats,REFCLSID,riidDevice,LPD3DENUMPIXELFORMATSCALLBACK,lpEnumCallback,LPVOID,lpContext) \
220 ICOM_METHOD (HRESULT,EvictManagedTextures)
221 #define IDirect3D3_IMETHODS \
222 IUnknown_IMETHODS \
223 IDirect3D3_METHODS
224 ICOM_DEFINE(IDirect3D3,IUnknown)
225 #undef ICOM_INTERFACE
227 /*** IUnknown methods ***/
228 #define IDirect3D3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
229 #define IDirect3D3_AddRef(p) ICOM_CALL (AddRef,p)
230 #define IDirect3D3_Release(p) ICOM_CALL (Release,p)
231 /*** IDirect3D3 methods ***/
232 #define IDirect3D3_EnumDevices(p,a,b) ICOM_CALL2(EnumDevices,p,a,b)
233 #define IDirect3D3_CreateLight(p,a,b) ICOM_CALL2(CreateLight,p,a,b)
234 #define IDirect3D3_CreateMaterial(p,a,b) ICOM_CALL2(CreateMaterial,p,a,b)
235 #define IDirect3D3_CreateViewport(p,a,b) ICOM_CALL2(CreateViewport,p,a,b)
236 #define IDirect3D3_FindDevice(p,a,b) ICOM_CALL2(FindDevice,p,a,b)
237 #define IDirect3D3_CreateDevice(p,a,b,c,d) ICOM_CALL4(CreateDevice,p,a,b,c,d)
238 #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) ICOM_CALL4(CreateVertexBuffer,p,a,b,c,d)
239 #define IDirect3D3_EnumZBufferFormats(p,a,b,c) ICOM_CALL3(EnumZBufferFormats,p,a,b,c)
240 #define IDirect3D3_EvictManagedTextures(p) ICOM_CALL0(EvictManagedTextures,p)
242 /*****************************************************************************
243 * IDirect3D7 interface
245 #define ICOM_INTERFACE IDirect3D7
246 #define IDirect3D7_METHODS \
247 ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK7,lpEnumDevicesCallback, LPVOID,lpUserArg) \
248 ICOM_METHOD3(HRESULT,CreateDevice, REFCLSID,rclsid,LPDIRECTDRAWSURFACE7,lpDDS, LPDIRECT3DDEVICE7*,lplpD3DDevice) \
249 ICOM_METHOD3(HRESULT,CreateVertexBuffer,LPD3DVERTEXBUFFERDESC,lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER7*,lplpD3DVertBuf,DWORD,dwFlags) \
250 ICOM_METHOD3(HRESULT,EnumZBufferFormats,REFCLSID,riidDevice,LPD3DENUMPIXELFORMATSCALLBACK,lpEnumCallback,LPVOID,lpContext) \
251 ICOM_METHOD (HRESULT,EvictManagedTextures)
252 #define IDirect3D7_IMETHODS \
253 IUnknown_IMETHODS \
254 IDirect3D7_METHODS
255 ICOM_DEFINE(IDirect3D7,IUnknown)
256 #undef ICOM_INTERFACE
258 /*** IUnknown methods ***/
259 #define IDirect3D7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
260 #define IDirect3D7_AddRef(p) ICOM_CALL (AddRef,p)
261 #define IDirect3D7_Release(p) ICOM_CALL (Release,p)
262 /*** IDirect3D3 methods ***/
263 #define IDirect3D7_EnumDevices(p,a,b) ICOM_CALL2(EnumDevices,p,a,b)
264 #define IDirect3D7_CreateDevice(p,a,b,c) ICOM_CALL3(CreateDevice,p,a,b,c)
265 #define IDirect3D7_CreateVertexBuffer(p,a,b,c) ICOM_CALL4(CreateVertexBuffer,p,a,b,c)
266 #define IDirect3D7_EnumZBufferFormats(p,a,b,c) ICOM_CALL3(EnumZBufferFormats,p,a,b,c)
267 #define IDirect3D7_EvictManagedTextures(p) ICOM_CALL0(EvictManagedTextures,p)
270 /*****************************************************************************
271 * IDirect3DLight interface
273 #define ICOM_INTERFACE IDirect3DLight
274 #define IDirect3DLight_METHODS \
275 ICOM_METHOD1(HRESULT,Initialize, LPDIRECT3D,lpDirect3D) \
276 ICOM_METHOD1(HRESULT,SetLight, LPD3DLIGHT,lpLight) \
277 ICOM_METHOD1(HRESULT,GetLight, LPD3DLIGHT,lpLight)
278 #define IDirect3DLight_IMETHODS \
279 IUnknown_IMETHODS \
280 IDirect3DLight_METHODS
281 ICOM_DEFINE(IDirect3DLight,IUnknown)
282 #undef ICOM_INTERFACE
284 /*** IUnknown methods ***/
285 #define IDirect3DLight_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
286 #define IDirect3DLight_AddRef(p) ICOM_CALL (AddRef,p)
287 #define IDirect3DLight_Release(p) ICOM_CALL (Release,p)
288 /*** IDirect3DLight methods ***/
289 #define IDirect3DLight_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
290 #define IDirect3DLight_SetLight(p,a) ICOM_CALL1(SetLight,p,a)
291 #define IDirect3DLight_GetLight(p,a) ICOM_CALL1(GetLight,p,a)
294 /*****************************************************************************
295 * IDirect3DMaterial interface
297 #define ICOM_INTERFACE IDirect3DMaterial
298 #define IDirect3DMaterial_METHODS \
299 ICOM_METHOD1(HRESULT,Initialize, LPDIRECT3D,lpDirect3D) \
300 ICOM_METHOD1(HRESULT,SetMaterial, LPD3DMATERIAL,lpMat) \
301 ICOM_METHOD1(HRESULT,GetMaterial, LPD3DMATERIAL,lpMat) \
302 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE2,lpDirect3DDevice2, LPD3DMATERIALHANDLE,lpHandle) \
303 ICOM_METHOD (HRESULT,Reserve) \
304 ICOM_METHOD (HRESULT,Unreserve)
305 #define IDirect3DMaterial_IMETHODS \
306 IUnknown_IMETHODS \
307 IDirect3DMaterial_METHODS
308 ICOM_DEFINE(IDirect3DMaterial,IUnknown)
309 #undef ICOM_INTERFACE
311 /*** IUnknown methods ***/
312 #define IDirect3DMaterial_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
313 #define IDirect3DMaterial_AddRef(p) ICOM_CALL (AddRef,p)
314 #define IDirect3DMaterial_Release(p) ICOM_CALL (Release,p)
315 /*** IDirect3DMaterial methods ***/
316 #define IDirect3DMaterial_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
317 #define IDirect3DMaterial_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
318 #define IDirect3DMaterial_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
319 #define IDirect3DMaterial_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
320 #define IDirect3DMaterial_Reserve(p) ICOM_CALL (Reserve,p)
321 #define IDirect3DMaterial_Unreserve(p) ICOM_CALL (Unreserve,p)
324 /*****************************************************************************
325 * IDirect3DMaterial2 interface
327 #define ICOM_INTERFACE IDirect3DMaterial2
328 #define IDirect3DMaterial2_METHODS \
329 ICOM_METHOD1(HRESULT,SetMaterial, LPD3DMATERIAL,lpMat) \
330 ICOM_METHOD1(HRESULT,GetMaterial, LPD3DMATERIAL,lpMat) \
331 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE2,lpDirect3DDevice2, LPD3DMATERIALHANDLE,lpHandle)
332 #define IDirect3DMaterial2_IMETHODS \
333 IUnknown_IMETHODS \
334 IDirect3DMaterial2_METHODS
335 ICOM_DEFINE(IDirect3DMaterial2,IUnknown)
336 #undef ICOM_INTERFACE
338 /*** IUnknown methods ***/
339 #define IDirect3DMaterial2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
340 #define IDirect3DMaterial2_AddRef(p) ICOM_CALL (AddRef,p)
341 #define IDirect3DMaterial2_Release(p) ICOM_CALL (Release,p)
342 /*** IDirect3DMaterial2 methods ***/
343 #define IDirect3DMaterial2_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
344 #define IDirect3DMaterial2_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
345 #define IDirect3DMaterial2_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
348 /*****************************************************************************
349 * IDirect3DMaterial3 interface
351 #define ICOM_INTERFACE IDirect3DMaterial3
352 #define IDirect3DMaterial3_METHODS \
353 ICOM_METHOD1(HRESULT,SetMaterial, LPD3DMATERIAL,lpMat) \
354 ICOM_METHOD1(HRESULT,GetMaterial, LPD3DMATERIAL,lpMat) \
355 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE3,lpDirect3DDevice2, LPD3DMATERIALHANDLE,lpHandle)
356 #define IDirect3DMaterial3_IMETHODS \
357 IUnknown_IMETHODS \
358 IDirect3DMaterial3_METHODS
359 ICOM_DEFINE(IDirect3DMaterial3,IUnknown)
360 #undef ICOM_INTERFACE
362 /*** IUnknown methods ***/
363 #define IDirect3DMaterial3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
364 #define IDirect3DMaterial3_AddRef(p) ICOM_CALL (AddRef,p)
365 #define IDirect3DMaterial3_Release(p) ICOM_CALL (Release,p)
366 /*** IDirect3DMaterial3 methods ***/
367 #define IDirect3DMaterial3_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
368 #define IDirect3DMaterial3_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
369 #define IDirect3DMaterial3_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
372 /*****************************************************************************
373 * IDirect3DTexture interface
375 #define ICOM_INTERFACE IDirect3DTexture
376 #define IDirect3DTexture_METHODS \
377 ICOM_METHOD2(HRESULT,Initialize, LPDIRECT3DDEVICE,lpDirect3DDevice, LPDIRECTDRAWSURFACE,) \
378 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE,lpDirect3DDevice, LPD3DTEXTUREHANDLE,) \
379 ICOM_METHOD2(HRESULT,PaletteChanged, DWORD,dwStart, DWORD,dwCount) \
380 ICOM_METHOD1(HRESULT,Load, LPDIRECT3DTEXTURE,lpD3DTexture) \
381 ICOM_METHOD (HRESULT,Unload)
382 #define IDirect3DTexture_IMETHODS \
383 IUnknown_IMETHODS \
384 IDirect3DTexture_METHODS
385 ICOM_DEFINE(IDirect3DTexture,IUnknown)
386 #undef ICOM_INTERFACE
388 /*** IUnknown methods ***/
389 #define IDirect3DTexture_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
390 #define IDirect3DTexture_AddRef(p) ICOM_CALL (AddRef,p)
391 #define IDirect3DTexture_Release(p) ICOM_CALL (Release,p)
392 /*** IDirect3DTexture methods ***/
393 #define IDirect3DTexture_Initialize(p,a,b,c) ICOM_CALL(Initialize,p,a,b,c)
394 #define IDirect3DTexture_GetHandle(p,a,b,c) ICOM_CALL(GetHandle,p,a,b,c)
395 #define IDirect3DTexture_PaletteChanged(p,a,b,c) ICOM_CALL(PaletteChanged,p,a,b,c)
396 #define IDirect3DTexture_Load(p,a,b,c) ICOM_CALL(Load,p,a,b,c)
397 #define IDirect3DTexture_Unload(p,a,b,c) ICOM_CALL(Unload,p,a,b,c)
400 /*****************************************************************************
401 * IDirect3DTexture2 interface
403 #define ICOM_INTERFACE IDirect3DTexture2
404 #define IDirect3DTexture2_METHODS \
405 ICOM_METHOD2(HRESULT,GetHandle, LPDIRECT3DDEVICE2,lpDirect3DDevice2, LPD3DTEXTUREHANDLE,lpHandle) \
406 ICOM_METHOD2(HRESULT,PaletteChanged, DWORD,dwStart, DWORD,dwCount) \
407 ICOM_METHOD1(HRESULT,Load, LPDIRECT3DTEXTURE2,lpD3DTexture2)
408 #define IDirect3DTexture2_IMETHODS \
409 IUnknown_IMETHODS \
410 IDirect3DTexture2_METHODS
411 ICOM_DEFINE(IDirect3DTexture2,IUnknown)
412 #undef ICOM_INTERFACE
414 /*** IUnknown methods ***/
415 #define IDirect3DTexture2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
416 #define IDirect3DTexture2_AddRef(p) ICOM_CALL (AddRef,p)
417 #define IDirect3DTexture2_Release(p) ICOM_CALL (Release,p)
418 /*** IDirect3DTexture2 methods ***/
419 #define IDirect3DTexture2_GetHandle(p,a,b) ICOM_CALL2(GetHandle,p,a,b)
420 #define IDirect3DTexture2_PaletteChanged(p,a,b) ICOM_CALL2(PaletteChanged,p,a,b)
421 #define IDirect3DTexture2_Load(p,a) ICOM_CALL1(Load,p,a)
424 /*****************************************************************************
425 * IDirect3DViewport interface
427 #define ICOM_INTERFACE IDirect3DViewport
428 #define IDirect3DViewport_METHODS \
429 ICOM_METHOD1(HRESULT,Initialize, LPDIRECT3D,lpDirect3D) \
430 ICOM_METHOD1(HRESULT,GetViewport, LPD3DVIEWPORT,lpData) \
431 ICOM_METHOD1(HRESULT,SetViewport, LPD3DVIEWPORT,lpData) \
432 ICOM_METHOD4(HRESULT,TransformVertices, DWORD,dwVertexCount, LPD3DTRANSFORMDATA,lpData, DWORD,dwFlags, LPDWORD,lpOffScreen) \
433 ICOM_METHOD2(HRESULT,LightElements, DWORD,dwElementCount, LPD3DLIGHTDATA,lpData) \
434 ICOM_METHOD1(HRESULT,SetBackground, D3DMATERIALHANDLE,hMat) \
435 ICOM_METHOD2(HRESULT,GetBackground, LPD3DMATERIALHANDLE,, LPBOOL,) \
436 ICOM_METHOD1(HRESULT,SetBackgroundDepth, LPDIRECTDRAWSURFACE,lpDDSurface) \
437 ICOM_METHOD2(HRESULT,GetBackgroundDepth, LPDIRECTDRAWSURFACE*,lplpDDSurface, LPBOOL,lpValid) \
438 ICOM_METHOD3(HRESULT,Clear, DWORD,dwCount, LPD3DRECT,lpRects, DWORD,dwFlags) \
439 ICOM_METHOD1(HRESULT,AddLight, LPDIRECT3DLIGHT,lpDirect3DLight) \
440 ICOM_METHOD1(HRESULT,DeleteLight, LPDIRECT3DLIGHT,lpDirect3DLight) \
441 ICOM_METHOD3(HRESULT,NextLight, LPDIRECT3DLIGHT,lpDirect3DLight, LPDIRECT3DLIGHT*,lplpDirect3DLight, DWORD,dwFlags)
442 #define IDirect3DViewport_IMETHODS \
443 IUnknown_IMETHODS \
444 IDirect3DViewport_METHODS
445 ICOM_DEFINE(IDirect3DViewport,IUnknown)
446 #undef ICOM_INTERFACE
448 /*** IUnknown methods ***/
449 #define IDirect3DViewport_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
450 #define IDirect3DViewport_AddRef(p) ICOM_CALL (AddRef,p)
451 #define IDirect3DViewport_Release(p) ICOM_CALL (Release,p)
452 /*** IDirect3DViewport methods ***/
453 #define IDirect3DViewport_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
454 #define IDirect3DViewport_GetViewport(p,a) ICOM_CALL1(GetViewport,p,a)
455 #define IDirect3DViewport_SetViewport(p,a) ICOM_CALL1(SetViewport,p,a)
456 #define IDirect3DViewport_TransformVertices(p,a,b,c,d) ICOM_CALL4(TransformVertices,p,a,b,c,d)
457 #define IDirect3DViewport_LightElements(p,a,b) ICOM_CALL2(LightElements,p,a,b)
458 #define IDirect3DViewport_SetBackground(p,a) ICOM_CALL1(SetBackground,p,a)
459 #define IDirect3DViewport_GetBackground(p,a,b) ICOM_CALL2(GetBackground,p,a,b)
460 #define IDirect3DViewport_SetBackgroundDepth(p,a) ICOM_CALL1(SetBackgroundDepth,p,a)
461 #define IDirect3DViewport_GetBackgroundDepth(p,a,b) ICOM_CALL2(GetBackgroundDepth,p,a,b)
462 #define IDirect3DViewport_Clear(p,a,b,c) ICOM_CALL3(Clear,p,a,b,c)
463 #define IDirect3DViewport_AddLight(p,a) ICOM_CALL1(AddLight,p,a)
464 #define IDirect3DViewport_DeleteLight(p,a) ICOM_CALL1(DeleteLight,p,a)
465 #define IDirect3DViewport_NextLight(p,a,b,c) ICOM_CALL3(NextLight,p,a,b,c)
468 /*****************************************************************************
469 * IDirect3DViewport2 interface
471 #define ICOM_INTERFACE IDirect3DViewport2
472 #define IDirect3DViewport2_METHODS \
473 ICOM_METHOD1(HRESULT,GetViewport2, LPD3DVIEWPORT2,lpData) \
474 ICOM_METHOD1(HRESULT,SetViewport2, LPD3DVIEWPORT2,lpData)
475 #define IDirect3DViewport2_IMETHODS \
476 IDirect3DViewport_IMETHODS \
477 IDirect3DViewport2_METHODS
478 ICOM_DEFINE(IDirect3DViewport2,IDirect3DViewport)
479 #undef ICOM_INTERFACE
481 /*** IUnknown methods ***/
482 #define IDirect3DViewport2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
483 #define IDirect3DViewport2_AddRef(p) ICOM_CALL (AddRef,p)
484 #define IDirect3DViewport2_Release(p) ICOM_CALL (Release,p)
485 /*** IDirect3Viewport methods ***/
486 #define IDirect3DViewport2_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
487 #define IDirect3DViewport2_GetViewport(p,a) ICOM_CALL1(GetViewport,p,a)
488 #define IDirect3DViewport2_SetViewport(p,a) ICOM_CALL1(SetViewport,p,a)
489 #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) ICOM_CALL4(TransformVertices,p,a,b,c,d)
490 #define IDirect3DViewport2_LightElements(p,a,b) ICOM_CALL2(LightElements,p,a,b)
491 #define IDirect3DViewport2_SetBackground(p,a) ICOM_CALL1(SetBackground,p,a)
492 #define IDirect3DViewport2_GetBackground(p,a,b) ICOM_CALL2(GetBackground,p,a,b)
493 #define IDirect3DViewport2_SetBackgroundDepth(p,a) ICOM_CALL1(SetBackgroundDepth,p,a)
494 #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) ICOM_CALL2(GetBackgroundDepth,p,a,b)
495 #define IDirect3DViewport2_Clear(p,a,b,c) ICOM_CALL3(Clear,p,a,b,c)
496 #define IDirect3DViewport2_AddLight(p,a) ICOM_CALL1(AddLight,p,a)
497 #define IDirect3DViewport2_DeleteLight(p,a) ICOM_CALL1(DeleteLight,p,a)
498 #define IDirect3DViewport2_NextLight(p,a,b,c) ICOM_CALL3(NextLight,p,a,b,c)
499 /*** IDirect3DViewport2 methods ***/
500 #define IDirect3DViewport2_GetViewport2(p,a) ICOM_CALL1(GetViewport2,p,a)
501 #define IDirect3DViewport2_SetViewport2(p,a) ICOM_CALL1(SetViewport2,p,a)
503 /*****************************************************************************
504 * IDirect3DViewport3 interface
506 #define ICOM_INTERFACE IDirect3DViewport3
507 #define IDirect3DViewport3_METHODS \
508 ICOM_METHOD1(HRESULT,SetBackgroundDepth2,LPDIRECTDRAWSURFACE4,lpDDS) \
509 ICOM_METHOD2(HRESULT,GetBackgroundDepth2,LPDIRECTDRAWSURFACE4*,lplpDDS,LPBOOL,lpValid) \
510 ICOM_METHOD6(HRESULT,Clear2,DWORD,dwCount,LPD3DRECT,lpRects,DWORD,dwFlags,DWORD,dwColor,D3DVALUE,dvZ,DWORD,dwStencil)
511 #define IDirect3DViewport3_IMETHODS \
512 IDirect3DViewport2_IMETHODS \
513 IDirect3DViewport3_METHODS
514 ICOM_DEFINE(IDirect3DViewport3,IDirect3DViewport)
515 #undef ICOM_INTERFACE
517 /*** IUnknown methods ***/
518 #define IDirect3DViewport3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
519 #define IDirect3DViewport3_AddRef(p) ICOM_CALL (AddRef,p)
520 #define IDirect3DViewport3_Release(p) ICOM_CALL (Release,p)
521 /*** IDirect3Viewport methods ***/
522 #define IDirect3DViewport3_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
523 #define IDirect3DViewport3_GetViewport(p,a) ICOM_CALL1(GetViewport,p,a)
524 #define IDirect3DViewport3_SetViewport(p,a) ICOM_CALL1(SetViewport,p,a)
525 #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) ICOM_CALL4(TransformVertices,p,a,b,c,d)
526 #define IDirect3DViewport3_LightElements(p,a,b) ICOM_CALL2(LightElements,p,a,b)
527 #define IDirect3DViewport3_SetBackground(p,a) ICOM_CALL1(SetBackground,p,a)
528 #define IDirect3DViewport3_GetBackground(p,a,b) ICOM_CALL2(GetBackground,p,a,b)
529 #define IDirect3DViewport3_SetBackgroundDepth(p,a) ICOM_CALL1(SetBackgroundDepth,p,a)
530 #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) ICOM_CALL2(GetBackgroundDepth,p,a,b)
531 #define IDirect3DViewport3_Clear(p,a,b,c) ICOM_CALL3(Clear,p,a,b,c)
532 #define IDirect3DViewport3_AddLight(p,a) ICOM_CALL1(AddLight,p,a)
533 #define IDirect3DViewport3_DeleteLight(p,a) ICOM_CALL1(DeleteLight,p,a)
534 #define IDirect3DViewport3_NextLight(p,a,b,c) ICOM_CALL3(NextLight,p,a,b,c)
535 /*** IDirect3DViewport2 methods ***/
536 #define IDirect3DViewport3_GetViewport3(p,a) ICOM_CALL1(GetViewport2,p,a)
537 #define IDirect3DViewport3_SetViewport3(p,a) ICOM_CALL1(SetViewport2,p,a)
538 /*** IDirect3DViewport3 methods ***/
539 #define IDirect3DViewport3_SetBackgroundDepth2(p,a) ICOM_CALL1(SetBackgroundDepth2,p,a)
540 #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) ICOM_CALL2(GetBackgroundDepth2,p,a,b)
541 #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) ICOM_CALL7(Clear2,p,a,b,c,d,e,f)
545 /*****************************************************************************
546 * IDirect3DExecuteBuffer interface
548 #define ICOM_INTERFACE IDirect3DExecuteBuffer
549 #define IDirect3DExecuteBuffer_METHODS \
550 ICOM_METHOD2(HRESULT,Initialize, LPDIRECT3DDEVICE,lpDirect3DDevice, LPD3DEXECUTEBUFFERDESC,lpDesc) \
551 ICOM_METHOD1(HRESULT,Lock, LPD3DEXECUTEBUFFERDESC,lpDesc) \
552 ICOM_METHOD (HRESULT,Unlock) \
553 ICOM_METHOD1(HRESULT,SetExecuteData, LPD3DEXECUTEDATA,lpData) \
554 ICOM_METHOD1(HRESULT,GetExecuteData, LPD3DEXECUTEDATA,lpData) \
555 ICOM_METHOD4(HRESULT,Validate, LPDWORD,lpdwOffset, LPD3DVALIDATECALLBACK,lpFunc, LPVOID,lpUserArg, DWORD,dwReserved) \
556 ICOM_METHOD1(HRESULT,Optimize, DWORD,)
557 #define IDirect3DExecuteBuffer_IMETHODS \
558 IUnknown_IMETHODS \
559 IDirect3DExecuteBuffer_METHODS
560 ICOM_DEFINE(IDirect3DExecuteBuffer,IUnknown)
561 #undef ICOM_INTERFACE
563 /*** IUnknown methods ***/
564 #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
565 #define IDirect3DExecuteBuffer_AddRef(p) ICOM_CALL (AddRef,p)
566 #define IDirect3DExecuteBuffer_Release(p) ICOM_CALL (Release,p)
567 /*** IDirect3DExecuteBuffer methods ***/
568 #define IDirect3DExecuteBuffer_Initialize(p,a,b) ICOM_CALL2(Initialize,p,a,b)
569 #define IDirect3DExecuteBuffer_Lock(p,a) ICOM_CALL1(Lock,p,a)
570 #define IDirect3DExecuteBuffer_Unlock(p) ICOM_CALL (Unlock,p)
571 #define IDirect3DExecuteBuffer_SetExecuteData(p,a) ICOM_CALL1(SetExecuteData,p,a)
572 #define IDirect3DExecuteBuffer_GetExecuteData(p,a) ICOM_CALL1(GetExecuteData,p,a)
573 #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) ICOM_CALL4(Validate,p,a,b,c,d)
574 #define IDirect3DExecuteBuffer_Optimize(p,a) ICOM_CALL1(Optimize,p,a)
577 /*****************************************************************************
578 * IDirect3DDevice interface
580 #define ICOM_INTERFACE IDirect3DDevice
581 #define IDirect3DDevice_METHODS \
582 ICOM_METHOD3(HRESULT,Initialize, LPDIRECT3D,lpDirect3D, LPGUID,lpGUID, LPD3DDEVICEDESC,lpD3DDVDesc) \
583 ICOM_METHOD2(HRESULT,GetCaps, LPD3DDEVICEDESC,lpD3DHWDevDesc, LPD3DDEVICEDESC,lpD3DHELDevDesc) \
584 ICOM_METHOD2(HRESULT,SwapTextureHandles, LPDIRECT3DTEXTURE,lpD3Dtex1, LPDIRECT3DTEXTURE,lpD3DTex2) \
585 ICOM_METHOD3(HRESULT,CreateExecuteBuffer, LPD3DEXECUTEBUFFERDESC,lpDesc, LPDIRECT3DEXECUTEBUFFER*,lplpDirect3DExecuteBuffer, IUnknown*,pUnkOuter) \
586 ICOM_METHOD1(HRESULT,GetStats, LPD3DSTATS,lpD3DStats) \
587 ICOM_METHOD3(HRESULT,Execute, LPDIRECT3DEXECUTEBUFFER,lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT,lpDirect3DViewport, DWORD,dwFlags) \
588 ICOM_METHOD1(HRESULT,AddViewport, LPDIRECT3DVIEWPORT,lpDirect3DViewport) \
589 ICOM_METHOD1(HRESULT,DeleteViewport, LPDIRECT3DVIEWPORT,lpDirect3DViewport) \
590 ICOM_METHOD3(HRESULT,NextViewport, LPDIRECT3DVIEWPORT,lpDirect3DViewport, LPDIRECT3DVIEWPORT*,lplpDirect3DViewport, DWORD,dwFlags) \
591 ICOM_METHOD4(HRESULT,Pick, LPDIRECT3DEXECUTEBUFFER,lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT,lpDirect3DViewport, DWORD,dwFlags, LPD3DRECT,lpRect) \
592 ICOM_METHOD2(HRESULT,GetPickRecords, LPDWORD,lpCount, LPD3DPICKRECORD,lpD3DPickRec) \
593 ICOM_METHOD2(HRESULT,EnumTextureFormats, LPD3DENUMTEXTUREFORMATSCALLBACK,lpD3DEnumTextureProc, LPVOID,lpArg) \
594 ICOM_METHOD1(HRESULT,CreateMatrix, LPD3DMATRIXHANDLE,lpD3DMatHandle) \
595 ICOM_METHOD2(HRESULT,SetMatrix, D3DMATRIXHANDLE,D3DMatHandle, LPD3DMATRIX,lpD3DMatrix) \
596 ICOM_METHOD2(HRESULT,GetMatrix, D3DMATRIXHANDLE,D3DMatHandle, LPD3DMATRIX,lpD3DMatrix) \
597 ICOM_METHOD1(HRESULT,DeleteMatrix, D3DMATRIXHANDLE,D3DMatHandle) \
598 ICOM_METHOD (HRESULT,BeginScene) \
599 ICOM_METHOD (HRESULT,EndScene) \
600 ICOM_METHOD1(HRESULT,GetDirect3D, LPDIRECT3D*,lplpDirect3D)
601 #define IDirect3DDevice_IMETHODS \
602 IUnknown_IMETHODS \
603 IDirect3DDevice_METHODS
604 ICOM_DEFINE(IDirect3DDevice,IUnknown)
605 #undef ICOM_INTERFACE
607 /*** IUnknown methods ***/
608 #define IDirect3DDevice_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
609 #define IDirect3DDevice_AddRef(p) ICOM_CALL (AddRef,p)
610 #define IDirect3DDevice_Release(p) ICOM_CALL (Release,p)
611 /*** IDirect3DDevice methods ***/
612 #define IDirect3DDevice_Initialize(p,a,b,c) ICOM_CALL3(Initialize,p,a,b,c)
613 #define IDirect3DDevice_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
614 #define IDirect3DDevice_SwapTextureHandles(p,a,b) ICOM_CALL2(SwapTextureHandles,p,a,b)
615 #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) ICOM_CALL3(CreateExecuteBuffer,p,a,b,c)
616 #define IDirect3DDevice_GetStats(p,a) ICOM_CALL1(GetStats,p,a)
617 #define IDirect3DDevice_Execute(p,a,b,c) ICOM_CALL3(Execute,p,a,b,c)
618 #define IDirect3DDevice_AddViewport(p,a) ICOM_CALL1(AddViewport,p,a)
619 #define IDirect3DDevice_DeleteViewport(p,a) ICOM_CALL1(DeleteViewport,p,a)
620 #define IDirect3DDevice_NextViewport(p,a,b,c) ICOM_CALL3(NextViewport,p,a,b,c)
621 #define IDirect3DDevice_Pick(p,a,b,c,d) ICOM_CALL4(Pick,p,a,b,c,d)
622 #define IDirect3DDevice_GetPickRecords(p,a,b) ICOM_CALL2(GetPickRecords,p,a,b)
623 #define IDirect3DDevice_EnumTextureFormats(p,a,b) ICOM_CALL2(EnumTextureFormats,p,a,b)
624 #define IDirect3DDevice_CreateMatrix(p,a) ICOM_CALL1(CreateMatrix,p,a)
625 #define IDirect3DDevice_SetMatrix(p,a,b) ICOM_CALL2(SetMatrix,p,a,b)
626 #define IDirect3DDevice_GetMatrix(p,a,b) ICOM_CALL2(GetMatrix,p,a,b)
627 #define IDirect3DDevice_DeleteMatrix(p,a) ICOM_CALL1(DeleteMatrix,p,a)
628 #define IDirect3DDevice_BeginScene(p) ICOM_CALL (BeginScene,p)
629 #define IDirect3DDevice_EndScene(p) ICOM_CALL (EndScene,p)
630 #define IDirect3DDevice_GetDirect3D(p,a) ICOM_CALL1(GetDirect3D,p,a)
633 /*****************************************************************************
634 * IDirect3DDevice2 interface
636 #define ICOM_INTERFACE IDirect3DDevice2
637 #define IDirect3DDevice2_METHODS \
638 ICOM_METHOD2(HRESULT,GetCaps, LPD3DDEVICEDESC,lpD3DHWDevDesc, LPD3DDEVICEDESC,lpD3DHELDevDesc) \
639 ICOM_METHOD2(HRESULT,SwapTextureHandles, LPDIRECT3DTEXTURE2,lpD3DTex1, LPDIRECT3DTEXTURE2,lpD3DTex2) \
640 ICOM_METHOD1(HRESULT,GetStats, LPD3DSTATS,lpD3DStats) \
641 ICOM_METHOD1(HRESULT,AddViewport, LPDIRECT3DVIEWPORT2,lpDirect3DViewport2) \
642 ICOM_METHOD1(HRESULT,DeleteViewport, LPDIRECT3DVIEWPORT2,lpDirect3DViewport2) \
643 ICOM_METHOD3(HRESULT,NextViewport, LPDIRECT3DVIEWPORT2,lpDirect3DViewport2, LPDIRECT3DVIEWPORT2*,lplpDirect3DViewport2, DWORD,dwFlags) \
644 ICOM_METHOD2(HRESULT,EnumTextureFormats, LPD3DENUMTEXTUREFORMATSCALLBACK,lpD3DEnumTextureProc, LPVOID,lpArg) \
645 ICOM_METHOD (HRESULT,BeginScene) \
646 ICOM_METHOD (HRESULT,EndScene) \
647 ICOM_METHOD1(HRESULT,GetDirect3D, LPDIRECT3D2*,lplpDirect3D2) \
648 /*** DrawPrimitive API ***/ \
649 ICOM_METHOD1(HRESULT,SetCurrentViewport, LPDIRECT3DVIEWPORT2,lpDirect3DViewport2) \
650 ICOM_METHOD1(HRESULT,GetCurrentViewport, LPDIRECT3DVIEWPORT2*,lplpDirect3DViewport2) \
651 ICOM_METHOD2(HRESULT,SetRenderTarget, LPDIRECTDRAWSURFACE,lpNewRenderTarget, DWORD,dwFlags) \
652 ICOM_METHOD1(HRESULT,GetRenderTarget, LPDIRECTDRAWSURFACE*,lplpRenderTarget) \
653 ICOM_METHOD3(HRESULT,Begin, D3DPRIMITIVETYPE,, D3DVERTEXTYPE,, DWORD,) \
654 ICOM_METHOD5(HRESULT,BeginIndexed, D3DPRIMITIVETYPE,d3dptPrimitiveType, D3DVERTEXTYPE,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwNumVertices, DWORD,dwFlags) \
655 ICOM_METHOD1(HRESULT,Vertex, LPVOID,lpVertexType) \
656 ICOM_METHOD1(HRESULT,Index, WORD,wVertexIndex) \
657 ICOM_METHOD1(HRESULT,End, DWORD,dwFlags) \
658 ICOM_METHOD2(HRESULT,GetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, LPDWORD,lpdwRenderState) \
659 ICOM_METHOD2(HRESULT,SetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, DWORD,dwRenderState) \
660 ICOM_METHOD2(HRESULT,GetLightState, D3DLIGHTSTATETYPE,dwLightStateType, LPDWORD,lpdwLightState) \
661 ICOM_METHOD2(HRESULT,SetLightState, D3DLIGHTSTATETYPE,dwLightStateType, DWORD,dwLightState) \
662 ICOM_METHOD2(HRESULT,SetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
663 ICOM_METHOD2(HRESULT,GetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
664 ICOM_METHOD2(HRESULT,MultiplyTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
665 ICOM_METHOD5(HRESULT,DrawPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, D3DVERTEXTYPE,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, DWORD,dwFlags) \
666 ICOM_METHOD7(HRESULT,DrawIndexedPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, D3DVERTEXTYPE,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, LPWORD,dwIndices, DWORD,dwIndexCount, DWORD,dwFlags) \
667 ICOM_METHOD1(HRESULT,SetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
668 ICOM_METHOD1(HRESULT,GetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus)
669 #define IDirect3DDevice2_IMETHODS \
670 IUnknown_IMETHODS \
671 IDirect3DDevice2_METHODS
672 ICOM_DEFINE(IDirect3DDevice2,IUnknown)
673 #undef ICOM_INTERFACE
675 /*** IUnknown methods ***/
676 #define IDirect3DDevice2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
677 #define IDirect3DDevice2_AddRef(p) ICOM_CALL (AddRef,p)
678 #define IDirect3DDevice2_Release(p) ICOM_CALL (Release,p)
679 /*** IDirect3DDevice2 methods ***/
680 #define IDirect3DDevice2_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
681 #define IDirect3DDevice2_SwapTextureHandles(p,a,b) ICOM_CALL2(SwapTextureHandles,p,a,b)
682 #define IDirect3DDevice2_GetStats(p,a) ICOM_CALL1(GetStats,p,a)
683 #define IDirect3DDevice2_AddViewport(p,a) ICOM_CALL1(AddViewport,p,a)
684 #define IDirect3DDevice2_DeleteViewport(p,a) ICOM_CALL1(DeleteViewport,p,a)
685 #define IDirect3DDevice2_NextViewport(p,a,b,c) ICOM_CALL3(NextViewport,p,a,b,c)
686 #define IDirect3DDevice2_EnumTextureFormats(p,a,b) ICOM_CALL2(EnumTextureFormats,p,a,b)
687 #define IDirect3DDevice2_BeginScene(p) ICOM_CALL (BeginScene,p)
688 #define IDirect3DDevice2_EndScene(p) ICOM_CALL (EndScene,p)
689 #define IDirect3DDevice2_GetDirect3D(p,a) ICOM_CALL1(GetDirect3D,p,a)
690 #define IDirect3DDevice2_SetCurrentViewport(p,a) ICOM_CALL1(SetCurrentViewport,p,a)
691 #define IDirect3DDevice2_GetCurrentViewport(p,a) ICOM_CALL1(GetCurrentViewport,p,a)
692 #define IDirect3DDevice2_SetRenderTarget(p,a,b) ICOM_CALL2(SetRenderTarget,p,a,b)
693 #define IDirect3DDevice2_GetRenderTarget(p,a) ICOM_CALL1(GetRenderTarget,p,a)
694 #define IDirect3DDevice2_Begin(p,a,b,c) ICOM_CALL3(Begin,p,a,b,c)
695 #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) ICOM_CALL5(BeginIndexed,p,a,b,c,d,e)
696 #define IDirect3DDevice2_Vertex(p,a) ICOM_CALL1(Vertex,p,a)
697 #define IDirect3DDevice2_Index(p,a) ICOM_CALL1(Index,p,a)
698 #define IDirect3DDevice2_End(p,a) ICOM_CALL1(End,p,a)
699 #define IDirect3DDevice2_GetRenderState(p,a,b) ICOM_CALL2(GetRenderState,p,a,b)
700 #define IDirect3DDevice2_SetRenderState(p,a,b) ICOM_CALL2(SetRenderState,p,a,b)
701 #define IDirect3DDevice2_GetLightState(p,a,b) ICOM_CALL2(GetLightState,p,a,b)
702 #define IDirect3DDevice2_SetLightState(p,a,b) ICOM_CALL2(SetLightState,p,a,b)
703 #define IDirect3DDevice2_SetTransform(p,a,b) ICOM_CALL2(SetTransform,p,a,b)
704 #define IDirect3DDevice2_GetTransform(p,a,b) ICOM_CALL2(GetTransform,p,a,b)
705 #define IDirect3DDevice2_MultiplyTransform(p,a,b) ICOM_CALL2(MultiplyTransform,p,a,b)
706 #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitive,p,a,b,c,d,e)
707 #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitive,p,a,b,c,d,e,f,g)
708 #define IDirect3DDevice2_SetClipStatus(p,a) ICOM_CALL1(SetClipStatus,p,a)
709 #define IDirect3DDevice2_GetClipStatus(p,a) ICOM_CALL1(GetClipStatus,p,a)
711 /*****************************************************************************
712 * IDirect3DDevice3 interface
714 #define ICOM_INTERFACE IDirect3DDevice3
715 #define IDirect3DDevice3_METHODS \
716 ICOM_METHOD2(HRESULT,GetCaps, LPD3DDEVICEDESC,lpD3DHWDevDesc, LPD3DDEVICEDESC,lpD3DHELDevDesc) \
717 ICOM_METHOD1(HRESULT,GetStats, LPD3DSTATS,lpD3DStats) \
718 ICOM_METHOD1(HRESULT,AddViewport, LPDIRECT3DVIEWPORT3,lpDirect3DViewport3) \
719 ICOM_METHOD1(HRESULT,DeleteViewport, LPDIRECT3DVIEWPORT3,lpDirect3DViewport3) \
720 ICOM_METHOD3(HRESULT,NextViewport, LPDIRECT3DVIEWPORT3,lpDirect3DViewport3, LPDIRECT3DVIEWPORT3*,lplpDirect3DViewport3, DWORD,dwFlags) \
721 ICOM_METHOD2(HRESULT,EnumTextureFormats, LPD3DENUMPIXELFORMATSCALLBACK,lpD3DEnumPixelProc, LPVOID,lpArg) \
722 ICOM_METHOD (HRESULT,BeginScene) \
723 ICOM_METHOD (HRESULT,EndScene) \
724 ICOM_METHOD1(HRESULT,GetDirect3D, LPDIRECT3D3*,lplpDirect3D3) \
725 /*** DrawPrimitive API ***/ \
726 ICOM_METHOD1(HRESULT,SetCurrentViewport, LPDIRECT3DVIEWPORT3,lpDirect3DViewport3) \
727 ICOM_METHOD1(HRESULT,GetCurrentViewport, LPDIRECT3DVIEWPORT3*,lplpDirect3DViewport3) \
728 ICOM_METHOD2(HRESULT,SetRenderTarget, LPDIRECTDRAWSURFACE,lpNewRenderTarget, DWORD,dwFlags) \
729 ICOM_METHOD1(HRESULT,GetRenderTarget, LPDIRECTDRAWSURFACE*,lplpRenderTarget) \
730 ICOM_METHOD3(HRESULT,Begin, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexTypeDesc, DWORD,dwFlags) \
731 ICOM_METHOD5(HRESULT,BeginIndexed, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwNumVertices, DWORD,dwFlags) \
732 ICOM_METHOD1(HRESULT,Vertex, LPVOID,lpVertexType) \
733 ICOM_METHOD1(HRESULT,Index, WORD,wVertexIndex) \
734 ICOM_METHOD1(HRESULT,End, DWORD,dwFlags) \
735 ICOM_METHOD2(HRESULT,GetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, LPDWORD,lpdwRenderState) \
736 ICOM_METHOD2(HRESULT,SetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, DWORD,dwRenderState) \
737 ICOM_METHOD2(HRESULT,GetLightState, D3DLIGHTSTATETYPE,dwLightStateType, LPDWORD,lpdwLightState) \
738 ICOM_METHOD2(HRESULT,SetLightState, D3DLIGHTSTATETYPE,dwLightStateType, DWORD,dwLightState) \
739 ICOM_METHOD2(HRESULT,SetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
740 ICOM_METHOD2(HRESULT,GetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
741 ICOM_METHOD2(HRESULT,MultiplyTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
742 ICOM_METHOD5(HRESULT,DrawPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, DWORD,dwFlags) \
743 ICOM_METHOD7(HRESULT,DrawIndexedPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, LPWORD,dwIndices, DWORD,dwIndexCount, DWORD,dwFlags) \
744 ICOM_METHOD1(HRESULT,SetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
745 ICOM_METHOD1(HRESULT,GetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
746 ICOM_METHOD5(HRESULT,DrawPrimitiveStrided, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA,lpD3DDrawPrimStrideData,DWORD,dwVertexCount,DWORD,dwFlags) \
747 ICOM_METHOD7(HRESULT,DrawIndexedPrimitiveStrided, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA,lpD3DDrawPrimStrideData,DWORD,dwVertexCount,LPWORD,lpIndex,DWORD,dwIndexCount,DWORD,dwFlags) \
748 ICOM_METHOD5(HRESULT,DrawPrimitiveVB, D3DPRIMITIVETYPE,d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER,lpD3DVertexBuf,DWORD,dwStartVertex,DWORD,dwNumVertices,DWORD,dwFlags) \
749 ICOM_METHOD5(HRESULT,DrawIndexedPrimitiveVB, D3DPRIMITIVETYPE,d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER,lpD3DVertexBuf,LPWORD,lpwIndices,DWORD,dwIndexCount,DWORD,dwFlags) \
750 ICOM_METHOD5(HRESULT,ComputeSphereVisibility, LPD3DVECTOR,lpCenters,LPD3DVALUE,lpRadii,DWORD,dwNumSpheres,DWORD,dwFlags,LPDWORD,lpdwReturnValues) \
751 ICOM_METHOD2(HRESULT,GetTexture, DWORD,dwStage,LPDIRECT3DTEXTURE2*,lplpTexture2) \
752 ICOM_METHOD2(HRESULT,SetTexture, DWORD,dwStage,LPDIRECT3DTEXTURE2,lpTexture2) \
753 ICOM_METHOD3(HRESULT,GetTextureStageState, DWORD,dwStage,D3DTEXTURESTAGESTATETYPE,d3dTexStageStateType,LPDWORD,lpdwState) \
754 ICOM_METHOD3(HRESULT,SetTextureStageState, DWORD,dwStage,D3DTEXTURESTAGESTATETYPE,d3dTexStageStateType,DWORD,dwState) \
755 ICOM_METHOD1(HRESULT,ValidateDevice, LPDWORD,lpdwPasses)
756 #define IDirect3DDevice3_IMETHODS \
757 IUnknown_IMETHODS \
758 IDirect3DDevice3_METHODS
759 ICOM_DEFINE(IDirect3DDevice3,IUnknown)
760 #undef ICOM_INTERFACE
762 /*** IUnknown methods ***/
763 #define IDirect3DDevice3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
764 #define IDirect3DDevice3_AddRef(p) ICOM_CALL (AddRef,p)
765 #define IDirect3DDevice3_Release(p) ICOM_CALL (Release,p)
766 /*** IDirect3DDevice3 methods ***/
767 #define IDirect3DDevice3_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
768 #define IDirect3DDevice3_GetStats(p,a) ICOM_CALL1(GetStats,p,a)
769 #define IDirect3DDevice3_AddViewport(p,a) ICOM_CALL1(AddViewport,p,a)
770 #define IDirect3DDevice3_DeleteViewport(p,a) ICOM_CALL1(DeleteViewport,p,a)
771 #define IDirect3DDevice3_NextViewport(p,a,b,c) ICOM_CALL3(NextViewport,p,a,b,c)
772 #define IDirect3DDevice3_EnumTextureFormats(p,a,b) ICOM_CALL2(EnumTextureFormats,p,a,b)
773 #define IDirect3DDevice3_BeginScene(p) ICOM_CALL (BeginScene,p)
774 #define IDirect3DDevice3_EndScene(p) ICOM_CALL (EndScene,p)
775 #define IDirect3DDevice3_GetDirect3D(p,a) ICOM_CALL1(GetDirect3D,p,a)
776 #define IDirect3DDevice3_SetCurrentViewport(p,a) ICOM_CALL1(SetCurrentViewport,p,a)
777 #define IDirect3DDevice3_GetCurrentViewport(p,a) ICOM_CALL1(GetCurrentViewport,p,a)
778 #define IDirect3DDevice3_SetRenderTarget(p,a,b) ICOM_CALL2(SetRenderTarget,p,a,b)
779 #define IDirect3DDevice3_GetRenderTarget(p,a) ICOM_CALL1(GetRenderTarget,p,a)
780 #define IDirect3DDevice3_Begin(p,a,b,c) ICOM_CALL3(Begin,p,a,b,c)
781 #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) ICOM_CALL5(BeginIndexed,p,a,b,c,d,e)
782 #define IDirect3DDevice3_Vertex(p,a) ICOM_CALL1(Vertex,p,a)
783 #define IDirect3DDevice3_Index(p,a) ICOM_CALL1(Index,p,a)
784 #define IDirect3DDevice3_End(p,a) ICOM_CALL1(End,p,a)
785 #define IDirect3DDevice3_GetRenderState(p,a,b) ICOM_CALL2(GetRenderState,p,a,b)
786 #define IDirect3DDevice3_SetRenderState(p,a,b) ICOM_CALL2(SetRenderState,p,a,b)
787 #define IDirect3DDevice3_GetLightState(p,a,b) ICOM_CALL2(GetLightState,p,a,b)
788 #define IDirect3DDevice3_SetLightState(p,a,b) ICOM_CALL2(SetLightState,p,a,b)
789 #define IDirect3DDevice3_SetTransform(p,a,b) ICOM_CALL2(SetTransform,p,a,b)
790 #define IDirect3DDevice3_GetTransform(p,a,b) ICOM_CALL2(GetTransform,p,a,b)
791 #define IDirect3DDevice3_MultiplyTransform(p,a,b) ICOM_CALL2(MultiplyTransform,p,a,b)
792 #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitive,p,a,b,c,d,e)
793 #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitive,p,a,b,c,d,e,f,g)
794 #define IDirect3DDevice3_SetClipStatus(p,a) ICOM_CALL1(SetClipStatus,p,a)
795 #define IDirect3DDevice3_GetClipStatus(p,a) ICOM_CALL1(GetClipStatus,p,a)
796 #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitiveStrided,p,a,b,c,d,e)
797 #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitiveStrided,p,a,b,c,d,e,f,g)
798 #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitiveVB,p,a,b,c,d,e)
799 #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) ICOM_CALL5(DrawIndexedPrimitiveVB,p,a,b,c,d,e)
800 #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) ICOM_CALL5(ComputeSphereVisibility,p,a,b,c,d,e)
801 #define IDirect3DDevice3_GetTexture(p,a,b) ICOM_CALL2(GetTexture,p,a,b)
802 #define IDirect3DDevice3_SetTexture(p,a,b) ICOM_CALL2(SetTexture,p,a,b)
803 #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) ICOM_CALL3(GetTextureStageState,p,a,b,c)
804 #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) ICOM_CALL3(SetTextureStageState,p,a,b,c)
805 #define IDirect3DDevice3_ValidateDevice(p,a) ICOM_CALL1(ValidateDevice,p,a)
807 /*****************************************************************************
808 * IDirect3DDevice7 interface
810 #define ICOM_INTERFACE IDirect3DDevice7
811 #define IDirect3DDevice7_METHODS \
812 ICOM_METHOD1(HRESULT,GetCaps, LPD3DDEVICEDESC7,lpD3DHELDevDesc) \
813 ICOM_METHOD2(HRESULT,EnumTextureFormats, LPD3DENUMPIXELFORMATSCALLBACK,lpD3DEnumPixelProc, LPVOID,lpArg) \
814 ICOM_METHOD (HRESULT,BeginScene) \
815 ICOM_METHOD (HRESULT,EndScene) \
816 ICOM_METHOD1(HRESULT,GetDirect3D, LPDIRECT3D7*,lplpDirect3D3) \
817 ICOM_METHOD2(HRESULT,SetRenderTarget, LPDIRECTDRAWSURFACE7,lpNewRenderTarget,DWORD,dwFlags) \
818 ICOM_METHOD1(HRESULT,GetRenderTarget, LPDIRECTDRAWSURFACE7*,lplpRenderTarget) \
819 ICOM_METHOD6(HRESULT,Clear, DWORD,,LPD3DRECT,,DWORD,,D3DCOLOR,,D3DVALUE,,DWORD,) \
820 ICOM_METHOD2(HRESULT,SetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
821 ICOM_METHOD2(HRESULT,GetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
822 ICOM_METHOD2(HRESULT,MultiplyTransform, D3DTRANSFORMSTATETYPE,,LPD3DMATRIX,) \
823 ICOM_METHOD1(HRESULT,GetViewport, LPD3DVIEWPORT7,lpData) \
824 ICOM_METHOD1(HRESULT,SetViewport, LPD3DVIEWPORT7,lpData) \
825 ICOM_METHOD1(HRESULT,SetMaterial, LPD3DMATERIAL7,lpMat) \
826 ICOM_METHOD1(HRESULT,GetMaterial, LPD3DMATERIAL7,lpMat) \
827 ICOM_METHOD2(HRESULT,SetLight, DWORD,,LPD3DLIGHT7,lpLight) \
828 ICOM_METHOD2(HRESULT,GetLight, DWORD,,LPD3DLIGHT7,lpLight) \
829 ICOM_METHOD2(HRESULT,SetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, DWORD,dwRenderState) \
830 ICOM_METHOD2(HRESULT,GetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, LPDWORD,lpdwRenderState) \
831 ICOM_METHOD (HRESULT,BeginStateBlock) \
832 ICOM_METHOD1(HRESULT,EndStateBlock, LPDWORD,) \
833 ICOM_METHOD1(HRESULT,PreLoad, LPDIRECTDRAWSURFACE7,) \
834 ICOM_METHOD5(HRESULT,DrawPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, DWORD,dwFlags) \
835 ICOM_METHOD7(HRESULT,DrawIndexedPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, LPWORD,dwIndices, DWORD,dwIndexCount, DWORD,dwFlags) \
836 ICOM_METHOD1(HRESULT,SetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
837 ICOM_METHOD1(HRESULT,GetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
838 ICOM_METHOD5(HRESULT,DrawPrimitiveStrided, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA,lpD3DDrawPrimStrideData,DWORD,dwVertexCount,DWORD,dwFlags) \
839 ICOM_METHOD7(HRESULT,DrawIndexedPrimitiveStrided, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA,lpD3DDrawPrimStrideData,DWORD,dwVertexCount,LPWORD,lpIndex,DWORD,dwIndexCount,DWORD,dwFlags) \
840 ICOM_METHOD5(HRESULT,DrawPrimitiveVB, D3DPRIMITIVETYPE,d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7,lpD3DVertexBuf,DWORD,dwStartVertex,DWORD,dwNumVertices,DWORD,dwFlags) \
841 ICOM_METHOD7(HRESULT,DrawIndexedPrimitiveVB, D3DPRIMITIVETYPE,d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7,lpD3DVertexBuf,DWORD,,DWORD,,LPWORD,lpwIndices,DWORD,dwIndexCount,DWORD,dwFlags) \
842 ICOM_METHOD5(HRESULT,ComputeSphereVisibility, LPD3DVECTOR,lpCenters,LPD3DVALUE,lpRadii,DWORD,dwNumSpheres,DWORD,dwFlags,LPDWORD,lpdwReturnValues) \
843 ICOM_METHOD2(HRESULT,GetTexture, DWORD,dwStage,LPDIRECTDRAWSURFACE7*,) \
844 ICOM_METHOD2(HRESULT,SetTexture, DWORD,dwStage,LPDIRECTDRAWSURFACE7,) \
845 ICOM_METHOD3(HRESULT,GetTextureStageState, DWORD,dwStage,D3DTEXTURESTAGESTATETYPE,d3dTexStageStateType,LPDWORD,lpdwState) \
846 ICOM_METHOD3(HRESULT,SetTextureStageState, DWORD,dwStage,D3DTEXTURESTAGESTATETYPE,d3dTexStageStateType,DWORD,dwState) \
847 ICOM_METHOD1(HRESULT,ValidateDevice, LPDWORD,lpdwPasses) \
848 ICOM_METHOD1(HRESULT,ApplyStateBlock, DWORD,) \
849 ICOM_METHOD1(HRESULT,CaptureStateBlock, DWORD,) \
850 ICOM_METHOD1(HRESULT,DeleteStateBlock, DWORD,) \
851 ICOM_METHOD2(HRESULT,CreateStateBlock, D3DSTATEBLOCKTYPE,,LPDWORD,) \
852 ICOM_METHOD5(HRESULT,Load, LPDIRECTDRAWSURFACE7,,LPPOINT,,LPDIRECTDRAWSURFACE7,,LPRECT,,DWORD,) \
853 ICOM_METHOD2(HRESULT,LightEnable, DWORD,,BOOL,) \
854 ICOM_METHOD2(HRESULT,GetLightEnable, DWORD,,BOOL*,) \
855 ICOM_METHOD2(HRESULT,SetClipPlane, DWORD,,D3DVALUE*,) \
856 ICOM_METHOD2(HRESULT,GetClipPlane, DWORD,,D3DVALUE*,) \
857 ICOM_METHOD3(HRESULT,GetInfo, DWORD,,LPVOID,,DWORD, )
858 #define IDirect3DDevice7_IMETHODS \
859 IUnknown_IMETHODS \
860 IDirect3DDevice7_METHODS
861 ICOM_DEFINE(IDirect3DDevice7,IUnknown)
862 #undef ICOM_INTERFACE
864 #define IDirect3DDevice7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
865 #define IDirect3DDevice7_AddRef(p) ICOM_CALL (AddRef,p)
866 #define IDirect3DDevice7_Release(p) ICOM_CALL (Release,p)
867 #define IDirect3DDevice7_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
868 #define IDirect3DDevice7_EnumTextureFormats(p,a,b) ICOM_CALL2(EnumTextureFormats,p,a,b)
869 #define IDirect3DDevice7_BeginScene(p) ICOM_CALL (BeginScene,p)
870 #define IDirect3DDevice7_EndScene(p) ICOM_CALL (EndScene,p)
871 #define IDirect3DDevice7_GetDirect3D(p,a) ICOM_CALL1(GetDirect3D,p,a)
872 #define IDirect3DDevice7_SetRenderTarget(p,a,b) ICOM_CALL2(SetRenderTarget,p,a,b)
873 #define IDirect3DDevice7_GetRenderTarget(p,a) ICOM_CALL1(GetRenderTarget,p,a)
874 #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) ICOM_CALL6(Clear,p,a,b,c,d,e,f)
875 #define IDirect3DDevice7_SetTransform(p,a,b) ICOM_CALL2(SetTransform,p,a,b)
876 #define IDirect3DDevice7_GetTransform(p,a,b) ICOM_CALL2(GetTransform,p,a,b)
877 #define IDirect3DDevice7_SetViewport(p,a) ICOM_CALL1(SetViewport,p,a)
878 #define IDirect3DDevice7_MultiplyTransform(p,a,b) ICOM_CALL2(MultiplyTransform,p,a,b)
879 #define IDirect3DDevice7_GetViewport(p,a) ICOM_CALL1(GetViewport,p,a)
880 #define IDirect3DDevice7_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
881 #define IDirect3DDevice7_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
882 #define IDirect3DDevice7_SetLight(p,a,b) ICOM_CALL2(SetLight,p,a,b)
883 #define IDirect3DDevice7_GetLight(p,a,b) ICOM_CALL2(GetLight,p,a,b)
884 #define IDirect3DDevice7_SetRenderState(p,a,b) ICOM_CALL2(SetRenderState,p,a,b)
885 #define IDirect3DDevice7_GetRenderState(p,a,b) ICOM_CALL2(GetRenderState,p,a,b)
886 #define IDirect3DDevice7_BeginStateBlock(p) ICOM_CALL (BeginStateBlock,p)
887 #define IDirect3DDevice7_EndStateBlock(p,a) ICOM_CALL1(EndStateBlock,p,a)
888 #define IDirect3DDevice7_PreLoad(p,a) ICOM_CALL1(PreLoad,p,a)
889 #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitive,p,a,b,c,d,e)
890 #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitive,p,a,b,c,d,e,f,g)
891 #define IDirect3DDevice7_SetClipStatus(p,a) ICOM_CALL1(SetClipStatus,p,a)
892 #define IDirect3DDevice7_GetClipStatus(p,a) ICOM_CALL1(GetClipStatus,p,a)
893 #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitiveStrided,p,a,b,c,d,e)
894 #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitiveStrided,p,a,b,c,d,e,f,g)
895 #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitiveVB,p,a,b,c,d,e)
896 #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitiveVB,p,a,b,c,d,e,f,g)
897 #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) ICOM_CALL5(ComputeSphereVisibility,p,a,b,c,d,e)
898 #define IDirect3DDevice7_GetTexture(p,a,b) ICOM_CALL2(GetTexture,p,a,b)
899 #define IDirect3DDevice7_SetTexture(p,a,b) ICOM_CALL2(SetTexture,p,a,b)
900 #define IDirect3DDevice7_GetTextureStageState(p,a,b,c) ICOM_CALL3(GetTextureStageState,p,a,b,c)
901 #define IDirect3DDevice7_SetTextureStageState(p,a,b,c) ICOM_CALL3(SetTextureStageState,p,a,b,c)
902 #define IDirect3DDevice7_ValidateDevice(p,a) ICOM_CALL1(ValidateDevice,p,a)
903 #define IDirect3DDevice7_ApplyStateBlock(p,a) ICOM_CALL1(ApplyStateBlock,p,a)
904 #define IDirect3DDevice7_CaptureStateBlock(p,a) ICOM_CALL1(CaptureStateBlock,p,a)
905 #define IDirect3DDevice7_DeleteStateBlock(p,a) ICOM_CALL1(DeleteStateBlock,p,a)
906 #define IDirect3DDevice7_CreateStateBlock(p,a,b) ICOM_CALL2(CreateStateBlock,p,a,b)
907 #define IDirect3DDevice7_Load(p,a,b,c,d,e) ICOM_CALL5(Load,p,a,b,c,d,e)
908 #define IDirect3DDevice7_LightEnable(p,a,b) ICOM_CALL2(LightEnable,p,a,b)
909 #define IDirect3DDevice7_GetLightEnable(p,a,b) ICOM_CALL2(GetLightEnable,p,a,b)
910 #define IDirect3DDevice7_SetClipPlane(p,a,b) ICOM_CALL2(SetClipPlane,p,a,b)
911 #define IDirect3DDevice7_GetClipPlane(p,a,b) ICOM_CALL2(GetClipPlane,p,a,b)
912 #define IDirect3DDevice7_GetInfo(p,a,b,c) ICOM_CALL3(GetInfo,p,a,b,c)
916 /*****************************************************************************
917 * IDirect3DVertexBuffer interface
919 #define ICOM_INTERFACE IDirect3DVertexBuffer
920 #define IDirect3DVertexBuffer_METHODS \
921 ICOM_METHOD3(HRESULT,Lock, DWORD,dwFlags,LPVOID*,lplpData,LPDWORD,lpdwSize) \
922 ICOM_METHOD (HRESULT,Unlock) \
923 ICOM_METHOD7(HRESULT,ProcessVertices, DWORD,dwVertexOp,DWORD,dwDestIndex,DWORD,dwCount,LPDIRECT3DVERTEXBUFFER,lpSrcBuffer,DWORD,dwSrcIndex,LPDIRECT3DDEVICE3,lpD3DDevice,DWORD,dwFlags) \
924 ICOM_METHOD1(HRESULT,GetVertexBufferDesc, LPD3DVERTEXBUFFERDESC,lpD3DVertexBufferDesc) \
925 ICOM_METHOD2(HRESULT,Optimize, LPDIRECT3DDEVICE3, lpD3DDevice,DWORD,dwFlags)
926 #define IDirect3DVertexBuffer_IMETHODS \
927 IUnknown_IMETHODS \
928 IDirect3DVertexBuffer_METHODS
929 ICOM_DEFINE(IDirect3DVertexBuffer,IUnknown)
930 #undef ICOM_INTERFACE
932 /*** IUnknown methods ***/
933 #define IDirect3DVertexBuffer_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
934 #define IDirect3DVertexBuffer_AddRef(p) ICOM_CALL (AddRef,p)
935 #define IDirect3DVertexBuffer_Release(p) ICOM_CALL (Release,p)
936 /*** IDirect3DVertexBuffer methods ***/
937 #define IDirect3DVertexBuffer_Lock(p,a,b,c) ICOM_CALL3(Lock,p,a,b,c)
938 #define IDirect3DVertexBuffer_Unlock(p) ICOM_CALL (Unlock,p)
939 #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) ICOM_CALL7(ProcessVertices,p,a,b,c,d,e,f,g)
940 #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) ICOM_CALL1(GetVertexBufferDesc,p,a)
941 #define IDirect3DVertexBuffer_Optimize(p,a,b) ICOM_CALL2(Optimize,p,a,b)
943 /*****************************************************************************
944 * IDirect3DVertexBuffer7 interface
946 #define ICOM_INTERFACE IDirect3DVertexBuffer7
947 #define IDirect3DVertexBuffer7_METHODS \
948 ICOM_METHOD3(HRESULT,Lock, DWORD,dwFlags,LPVOID*,lplpData,LPDWORD,lpdwSize) \
949 ICOM_METHOD (HRESULT,Unlock) \
950 ICOM_METHOD7(HRESULT,ProcessVertices, DWORD,dwVertexOp,DWORD,dwDestIndex,DWORD,dwCount,LPDIRECT3DVERTEXBUFFER7,lpSrcBuffer,DWORD,dwSrcIndex,LPDIRECT3DDEVICE7,lpD3DDevice,DWORD,dwFlags) \
951 ICOM_METHOD1(HRESULT,GetVertexBufferDesc, LPD3DVERTEXBUFFERDESC,lpD3DVertexBufferDesc) \
952 ICOM_METHOD2(HRESULT,Optimize, LPDIRECT3DDEVICE7, lpD3DDevice,DWORD,dwFlags) \
953 ICOM_METHOD7(HRESULT,ProcessVerticesStrided, DWORD,,DWORD,,DWORD,,LPD3DDRAWPRIMITIVESTRIDEDDATA,,DWORD,,LPDIRECT3DDEVICE7,,DWORD,)
954 #define IDirect3DVertexBuffer7_IMETHODS \
955 IUnknown_IMETHODS \
956 IDirect3DVertexBuffer7_METHODS
957 ICOM_DEFINE(IDirect3DVertexBuffer7,IUnknown)
958 #undef ICOM_INTERFACE
960 /*** IUnknown methods ***/
961 #define IDirect3DVertexBuffer7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
962 #define IDirect3DVertexBuffer7_AddRef(p) ICOM_CALL (AddRef,p)
963 #define IDirect3DVertexBuffer7_Release(p) ICOM_CALL (Release,p)
965 /*** IDirect3DVertexBuffer7 methods ***/
966 #define IDirect3DVertexBuffer7_Lock(p,a,b,c) ICOM_CALL3(Lock,p,a,b,c)
967 #define IDirect3DVertexBuffer7_Unlock(p) ICOM_CALL (Unlock,p)
968 #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) ICOM_CALL7(ProcessVertices,p,a,b,c,d,e,f,g)
969 #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) ICOM_CALL1(GetVertexBufferDesc,p,a)
970 #define IDirect3DVertexBuffer7_Optimize(p,a,b) ICOM_CALL2(Optimize,p,a,b)
971 #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) ICOM_CALL7(ProcessVerticesStrided,p,a,b,c,d,e,f,g)
974 #endif /* __WINE_D3D_H */