2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include <d3dtypes.h> /* must precede d3dcaps.h */
27 /*****************************************************************************
28 * Predeclare the interfaces
30 DEFINE_GUID(IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
31 DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
32 DEFINE_GUID(IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
33 DEFINE_GUID(IID_IDirect3D7, 0xf5049e77,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
35 DEFINE_GUID(IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
36 DEFINE_GUID(IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
37 DEFINE_GUID(IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
38 DEFINE_GUID(IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
39 DEFINE_GUID(IID_IDirect3DRefDevice, 0x50936643,0x13e9,0x11d1,0x89,0xaa,0x00,0xa0,0xc9,0x05,0x41,0x29);
40 DEFINE_GUID(IID_IDirect3DTnLHalDevice, 0xf5049e78,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
41 DEFINE_GUID(IID_IDirect3DNullDevice, 0x8767df22,0xbacc,0x11d1,0x89,0x69,0x00,0xa0,0xc9,0x06,0x29,0xa8);
43 DEFINE_GUID(IID_IDirect3DDevice, 0x64108800,0x957d,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
44 DEFINE_GUID(IID_IDirect3DDevice2, 0x93281501,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
45 DEFINE_GUID(IID_IDirect3DDevice3, 0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
46 DEFINE_GUID(IID_IDirect3DDevice7, 0xf5049e79,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
48 DEFINE_GUID(IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
49 DEFINE_GUID(IID_IDirect3DTexture2, 0x93281502,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
51 DEFINE_GUID(IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
53 DEFINE_GUID(IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
54 DEFINE_GUID(IID_IDirect3DMaterial2, 0x93281503,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
55 DEFINE_GUID(IID_IDirect3DMaterial3, 0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x00,0x60,0x08,0x52,0xb3,0x12);
57 DEFINE_GUID(IID_IDirect3DExecuteBuffer, 0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
59 DEFINE_GUID(IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
60 DEFINE_GUID(IID_IDirect3DViewport2, 0x93281500,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
61 DEFINE_GUID(IID_IDirect3DViewport3, 0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
63 DEFINE_GUID(IID_IDirect3DVertexBuffer, 0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x00,0xa0,0xc9,0x03,0x67,0xf8);
64 DEFINE_GUID(IID_IDirect3DVertexBuffer7, 0xf5049e7d,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
67 typedef struct IDirect3D IDirect3D ,*LPDIRECT3D;
68 typedef struct IDirect3D2 IDirect3D2,*LPDIRECT3D2;
69 typedef struct IDirect3D3 IDirect3D3,*LPDIRECT3D3;
70 typedef struct IDirect3D7 IDirect3D7,*LPDIRECT3D7;
72 typedef struct IDirect3DLight IDirect3DLight,*LPDIRECT3DLIGHT;
74 typedef struct IDirect3DDevice IDirect3DDevice, *LPDIRECT3DDEVICE;
75 typedef struct IDirect3DDevice2 IDirect3DDevice2, *LPDIRECT3DDEVICE2;
76 typedef struct IDirect3DDevice3 IDirect3DDevice3, *LPDIRECT3DDEVICE3;
77 typedef struct IDirect3DDevice7 IDirect3DDevice7, *LPDIRECT3DDEVICE7;
79 typedef struct IDirect3DViewport IDirect3DViewport, *LPDIRECT3DVIEWPORT;
80 typedef struct IDirect3DViewport2 IDirect3DViewport2, *LPDIRECT3DVIEWPORT2;
81 typedef struct IDirect3DViewport3 IDirect3DViewport3, *LPDIRECT3DVIEWPORT3;
83 typedef struct IDirect3DMaterial IDirect3DMaterial, *LPDIRECT3DMATERIAL;
84 typedef struct IDirect3DMaterial2 IDirect3DMaterial2, *LPDIRECT3DMATERIAL2;
85 typedef struct IDirect3DMaterial3 IDirect3DMaterial3, *LPDIRECT3DMATERIAL3;
87 typedef struct IDirect3DTexture IDirect3DTexture, *LPDIRECT3DTEXTURE;
88 typedef struct IDirect3DTexture2 IDirect3DTexture2, *LPDIRECT3DTEXTURE2;
90 typedef struct IDirect3DExecuteBuffer IDirect3DExecuteBuffer, *LPDIRECT3DEXECUTEBUFFER;
92 typedef struct IDirect3DVertexBuffer IDirect3DVertexBuffer, *LPDIRECT3DVERTEXBUFFER;
93 typedef struct IDirect3DVertexBuffer7 IDirect3DVertexBuffer7, *LPDIRECT3DVERTEXBUFFER7;
95 /* ********************************************************************
97 ******************************************************************** */
99 #define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
100 #define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
101 #define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
102 #define D3DERR_INITFAILED MAKE_DDHRESULT(706)
103 #define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
104 #define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
105 #define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
106 #define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
107 #define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
108 #define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
109 #define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
110 #define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
111 #define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
112 #define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
113 #define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
114 #define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
115 #define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
116 #define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
117 #define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
118 #define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
119 #define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
120 #define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
121 #define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
122 #define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
123 #define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
124 #define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
125 #define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
126 #define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
127 #define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
128 #define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
129 #define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
130 #define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
131 #define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
132 #define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
133 #define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
134 #define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
135 #define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
136 #define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
137 #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
138 #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
139 #define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
140 #define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
141 #define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
142 #define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
143 #define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
144 #define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
145 #define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
146 #define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
147 #define D3DERR_INBEGIN MAKE_DDHRESULT(770)
148 #define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
149 #define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
150 #define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
151 #define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
152 #define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
153 #define D3DERR_INVALIDVERTEXFORMAT MAKE_DDHRESULT(2048)
154 #define D3DERR_VERTEXBUFFEROPTIMIZED MAKE_DDHRESULT(2060)
155 #define D3DERR_VBUF_CREATE_FAILED MAKE_DDHRESULT(2061)
156 #define D3DERR_VERTEXBUFFERLOCKED MAKE_DDHRESULT(2062)
157 #define D3DERR_VERTEXBUFFERUNLOCKFAILED MAKE_DDHRESULT(2063)
158 #define D3DERR_ZBUFFER_NOTPRESENT MAKE_DDHRESULT(2070)
159 #define D3DERR_STENCILBUFFER_NOTPRESENT MAKE_DDHRESULT(2071)
161 #define D3DERR_WRONGTEXTUREFORMAT MAKE_DDHRESULT(2072)
162 #define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_DDHRESULT(2073)
163 #define D3DERR_UNSUPPORTEDCOLORARG MAKE_DDHRESULT(2074)
164 #define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_DDHRESULT(2075)
165 #define D3DERR_UNSUPPORTEDALPHAARG MAKE_DDHRESULT(2076)
166 #define D3DERR_TOOMANYOPERATIONS MAKE_DDHRESULT(2077)
167 #define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_DDHRESULT(2078)
168 #define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_DDHRESULT(2079)
169 #define D3DERR_CONFLICTINGRENDERSTATE MAKE_DDHRESULT(2081)
170 #define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_DDHRESULT(2082)
171 #define D3DERR_TOOMANYPRIMITIVES MAKE_DDHRESULT(2083)
172 #define D3DERR_INVALIDMATRIX MAKE_DDHRESULT(2084)
173 #define D3DERR_TOOMANYVERTICES MAKE_DDHRESULT(2085)
174 #define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_DDHRESULT(2086)
176 #define D3DERR_INVALIDSTATEBLOCK MAKE_DDHRESULT(2100)
177 #define D3DERR_INBEGINSTATEBLOCK MAKE_DDHRESULT(2101)
178 #define D3DERR_NOTINBEGINSTATEBLOCK MAKE_DDHRESULT(2102)
180 /* ********************************************************************
182 ******************************************************************** */
183 #define D3DNEXT_NEXT 0x01l
184 #define D3DNEXT_HEAD 0x02l
185 #define D3DNEXT_TAIL 0x04l
187 #define D3DDP_WAIT 0x00000001l
188 #define D3DDP_OUTOFORDER 0x00000002l
189 #define D3DDP_DONOTCLIP 0x00000004l
190 #define D3DDP_DONOTUPDATEEXTENTS 0x00000008l
191 #define D3DDP_DONOTLIGHT 0x00000010l
193 /* ********************************************************************
195 ******************************************************************** */
196 typedef DWORD D3DVIEWPORTHANDLE, *LPD3DVIEWPORTHANDLE;
199 /*****************************************************************************
200 * IDirect3D interface
202 #define INTERFACE IDirect3D
203 #define IDirect3D_METHODS \
205 STDMETHOD(Initialize)(THIS_ REFIID riid) PURE; \
206 STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE; \
207 STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE; \
208 STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL *lplpDirect3DMaterial, IUnknown *pUnkOuter) PURE; \
209 STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT *lplpD3DViewport, IUnknown *pUnkOuter) PURE; \
210 STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lplpD3DDevice) PURE;
211 ICOM_DEFINE(IDirect3D,IUnknown)
215 /*** IUnknown methods ***/
216 #define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
217 #define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
218 #define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
219 /*** IDirect3D methods ***/
220 #define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
221 #define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
222 #define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
223 #define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
224 #define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
225 #define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
229 /*****************************************************************************
230 * IDirect3D2 interface
232 #define INTERFACE IDirect3D2
233 #define IDirect3D2_METHODS \
235 STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE; \
236 STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE; \
237 STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL2 *lplpDirect3DMaterial2, IUnknown *pUnkOuter) PURE; \
238 STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT2 *lplpD3DViewport2, IUnknown *pUnkOuter) PURE; \
239 STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lpD3DFDR) PURE; \
240 STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid, LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DDEVICE2 *lplpD3DDevice2) PURE;
241 ICOM_DEFINE(IDirect3D2,IUnknown)
245 /*** IUnknown methods ***/
246 #define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
247 #define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p)
248 #define IDirect3D2_Release(p) (p)->lpVtbl->Release(p)
249 /*** IDirect3D2 methods ***/
250 #define IDirect3D2_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
251 #define IDirect3D2_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
252 #define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
253 #define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
254 #define IDirect3D2_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
255 #define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
259 /*****************************************************************************
260 * IDirect3D3 interface
262 #define INTERFACE IDirect3D3
263 #define IDirect3D3_METHODS \
265 STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE; \
266 STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE; \
267 STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL3 *lplpDirect3DMaterial3, IUnknown *pUnkOuter) PURE; \
268 STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT3 *lplpD3DViewport3, IUnknown *pUnkOuter) PURE; \
269 STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lpD3DFDR) PURE; \
270 STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid,LPDIRECTDRAWSURFACE4 lpDDS, LPDIRECT3DDEVICE3 *lplpD3DDevice3,LPUNKNOWN lpUnk) PURE; \
271 STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER *lplpD3DVertBuf,DWORD dwFlags,LPUNKNOWN lpUnk) PURE; \
272 STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID riidDevice,LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext) PURE; \
273 STDMETHOD(EvictManagedTextures)(THIS) PURE;
274 ICOM_DEFINE(IDirect3D3,IUnknown)
278 /*** IUnknown methods ***/
279 #define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
280 #define IDirect3D3_AddRef(p) (p)->lpVtbl->AddRef(p)
281 #define IDirect3D3_Release(p) (p)->lpVtbl->Release(p)
282 /*** IDirect3D3 methods ***/
283 #define IDirect3D3_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
284 #define IDirect3D3_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
285 #define IDirect3D3_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
286 #define IDirect3D3_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
287 #define IDirect3D3_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
288 #define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
289 #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d)
290 #define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
291 #define IDirect3D3_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
294 /*****************************************************************************
295 * IDirect3D7 interface
297 #define INTERFACE IDirect3D7
298 #define IDirect3D7_METHODS \
300 STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback, LPVOID lpUserArg) PURE; \
301 STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid,LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 *lplpD3DDevice) PURE; \
302 STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER7 *lplpD3DVertBuf,DWORD dwFlags) PURE; \
303 STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID riidDevice,LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext) PURE; \
304 STDMETHOD(EvictManagedTextures)(THIS) PURE;
305 ICOM_DEFINE(IDirect3D7,IUnknown)
309 /*** IUnknown methods ***/
310 #define IDirect3D7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
311 #define IDirect3D7_AddRef(p) (p)->lpVtbl->AddRef(p)
312 #define IDirect3D7_Release(p) (p)->lpVtbl->Release(p)
313 /*** IDirect3D3 methods ***/
314 #define IDirect3D7_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
315 #define IDirect3D7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
316 #define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c)
317 #define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
318 #define IDirect3D7_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
322 /*****************************************************************************
323 * IDirect3DLight interface
325 #define INTERFACE IDirect3DLight
326 #define IDirect3DLight_METHODS \
328 STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE; \
329 STDMETHOD(SetLight)(THIS_ LPD3DLIGHT lpLight) PURE; \
330 STDMETHOD(GetLight)(THIS_ LPD3DLIGHT lpLight) PURE;
331 ICOM_DEFINE(IDirect3DLight,IUnknown)
335 /*** IUnknown methods ***/
336 #define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
337 #define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
338 #define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
339 /*** IDirect3DLight methods ***/
340 #define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
341 #define IDirect3DLight_SetLight(p,a) (p)->lpVtbl->SetLight(p,a)
342 #define IDirect3DLight_GetLight(p,a) (p)->lpVtbl->GetLight(p,a)
346 /*****************************************************************************
347 * IDirect3DMaterial interface
349 #define INTERFACE IDirect3DMaterial
350 #define IDirect3DMaterial_METHODS \
352 STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE; \
353 STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; \
354 STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; \
355 STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DMATERIALHANDLE lpHandle) PURE; \
356 STDMETHOD(Reserve)(THIS) PURE; \
357 STDMETHOD(Unreserve)(THIS) PURE;
358 ICOM_DEFINE(IDirect3DMaterial,IUnknown)
362 /*** IUnknown methods ***/
363 #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
364 #define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
365 #define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
366 /*** IDirect3DMaterial methods ***/
367 #define IDirect3DMaterial_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
368 #define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
369 #define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
370 #define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
371 #define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
372 #define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
376 /*****************************************************************************
377 * IDirect3DMaterial2 interface
379 #define INTERFACE IDirect3DMaterial2
380 #define IDirect3DMaterial2_METHODS \
382 STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; \
383 STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; \
384 STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2 lpDirect3DDevice2, LPD3DMATERIALHANDLE lpHandle) PURE;
385 ICOM_DEFINE(IDirect3DMaterial2,IUnknown)
389 /*** IUnknown methods ***/
390 #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
391 #define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p)
392 #define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p)
393 /*** IDirect3DMaterial2 methods ***/
394 #define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
395 #define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
396 #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
400 /*****************************************************************************
401 * IDirect3DMaterial3 interface
403 #define INTERFACE IDirect3DMaterial3
404 #define IDirect3DMaterial3_METHODS \
406 STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; \
407 STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE; \
408 STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE3 lpDirect3DDevice3, LPD3DMATERIALHANDLE lpHandle) PURE;
409 ICOM_DEFINE(IDirect3DMaterial3,IUnknown)
413 /*** IUnknown methods ***/
414 #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
415 #define IDirect3DMaterial3_AddRef(p) (p)->lpVtbl->AddRef(p)
416 #define IDirect3DMaterial3_Release(p) (p)->lpVtbl->Release(p)
417 /*** IDirect3DMaterial3 methods ***/
418 #define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
419 #define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
420 #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
424 /*****************************************************************************
425 * IDirect3DTexture interface
427 #define INTERFACE IDirect3DTexture
428 #define IDirect3DTexture_METHODS \
430 STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPDIRECTDRAWSURFACE lpDDSurface) PURE; \
431 STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DTEXTUREHANDLE lpHandle) PURE; \
432 STDMETHOD(PaletteChanged)(THIS_ DWORD dwStart, DWORD dwCount) PURE; \
433 STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE lpD3DTexture) PURE; \
434 STDMETHOD(Unload)(THIS) PURE;
435 ICOM_DEFINE(IDirect3DTexture,IUnknown)
439 /*** IUnknown methods ***/
440 #define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
441 #define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
442 #define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
443 /*** IDirect3DTexture methods ***/
444 #define IDirect3DTexture_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
445 #define IDirect3DTexture_GetHandle(p,a,b,c) (p)->lpVtbl->GetHandle(p,a,b,c)
446 #define IDirect3DTexture_PaletteChanged(p,a,b,c) (p)->lpVtbl->PaletteChanged(p,a,b,c)
447 #define IDirect3DTexture_Load(p,a,b,c) (p)->lpVtbl->Load(p,a,b,c)
448 #define IDirect3DTexture_Unload(p,a,b,c) (p)->lpVtbl->Unload(p,a,b,c)
452 /*****************************************************************************
453 * IDirect3DTexture2 interface
455 #define INTERFACE IDirect3DTexture2
456 #define IDirect3DTexture2_METHODS \
458 STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2 lpDirect3DDevice2, LPD3DTEXTUREHANDLE lpHandle) PURE; \
459 STDMETHOD(PaletteChanged)(THIS_ DWORD dwStart, DWORD dwCount) PURE; \
460 STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE2 lpD3DTexture2) PURE;
461 ICOM_DEFINE(IDirect3DTexture2,IUnknown)
465 /*** IUnknown methods ***/
466 #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
467 #define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p)
468 #define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p)
469 /*** IDirect3DTexture2 methods ***/
470 #define IDirect3DTexture2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
471 #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
472 #define IDirect3DTexture2_Load(p,a) (p)->lpVtbl->Load(p,a)
476 /*****************************************************************************
477 * IDirect3DViewport interface
479 #define INTERFACE IDirect3DViewport
480 #define IDirect3DViewport_METHODS \
482 STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE; \
483 STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE; \
484 STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE; \
485 STDMETHOD(TransformVertices)(THIS_ DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffScreen) PURE; \
486 STDMETHOD(LightElements)(THIS_ DWORD dwElementCount, LPD3DLIGHTDATA lpData) PURE; \
487 STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE; \
488 STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid) PURE; \
489 STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface) PURE; \
490 STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *lplpDDSurface, LPBOOL lpValid) PURE; \
491 STDMETHOD(Clear)(THIS_ DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags) PURE; \
492 STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE; \
493 STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE; \
494 STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT *lplpDirect3DLight, DWORD dwFlags) PURE;
495 ICOM_DEFINE(IDirect3DViewport,IUnknown)
499 /*** IUnknown methods ***/
500 #define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
501 #define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
502 #define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
503 /*** IDirect3DViewport methods ***/
504 #define IDirect3DViewport_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
505 #define IDirect3DViewport_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
506 #define IDirect3DViewport_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
507 #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
508 #define IDirect3DViewport_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
509 #define IDirect3DViewport_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
510 #define IDirect3DViewport_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
511 #define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
512 #define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
513 #define IDirect3DViewport_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
514 #define IDirect3DViewport_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
515 #define IDirect3DViewport_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
516 #define IDirect3DViewport_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
520 /*****************************************************************************
521 * IDirect3DViewport2 interface
523 #define INTERFACE IDirect3DViewport2
524 #define IDirect3DViewport2_METHODS \
525 IDirect3DViewport_METHODS \
526 STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE; \
527 STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE;
528 ICOM_DEFINE(IDirect3DViewport2,IDirect3DViewport)
532 /*** IUnknown methods ***/
533 #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
534 #define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p)
535 #define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p)
536 /*** IDirect3Viewport methods ***/
537 #define IDirect3DViewport2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
538 #define IDirect3DViewport2_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
539 #define IDirect3DViewport2_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
540 #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
541 #define IDirect3DViewport2_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
542 #define IDirect3DViewport2_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
543 #define IDirect3DViewport2_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
544 #define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
545 #define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
546 #define IDirect3DViewport2_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
547 #define IDirect3DViewport2_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
548 #define IDirect3DViewport2_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
549 #define IDirect3DViewport2_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
550 /*** IDirect3DViewport2 methods ***/
551 #define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
552 #define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
555 /*****************************************************************************
556 * IDirect3DViewport3 interface
558 #define INTERFACE IDirect3DViewport3
559 #define IDirect3DViewport3_METHODS \
560 IDirect3DViewport2_METHODS \
561 STDMETHOD(SetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4 lpDDS) PURE; \
562 STDMETHOD(GetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4 *lplpDDS,LPBOOL lpValid) PURE; \
563 STDMETHOD(Clear2)(THIS_ DWORD dwCount,LPD3DRECT lpRects,DWORD dwFlags,DWORD dwColor,D3DVALUE dvZ,DWORD dwStencil) PURE;
564 ICOM_DEFINE(IDirect3DViewport3,IDirect3DViewport2)
568 /*** IUnknown methods ***/
569 #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
570 #define IDirect3DViewport3_AddRef(p) (p)->lpVtbl->AddRef(p)
571 #define IDirect3DViewport3_Release(p) (p)->lpVtbl->Release(p)
572 /*** IDirect3Viewport methods ***/
573 #define IDirect3DViewport3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
574 #define IDirect3DViewport3_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
575 #define IDirect3DViewport3_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
576 #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
577 #define IDirect3DViewport3_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
578 #define IDirect3DViewport3_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
579 #define IDirect3DViewport3_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
580 #define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
581 #define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
582 #define IDirect3DViewport3_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
583 #define IDirect3DViewport3_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
584 #define IDirect3DViewport3_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
585 #define IDirect3DViewport3_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
586 /*** IDirect3DViewport2 methods ***/
587 #define IDirect3DViewport3_GetViewport3(p,a) (p)->lpVtbl->GetViewport2(p,a)
588 #define IDirect3DViewport3_SetViewport3(p,a) (p)->lpVtbl->SetViewport2(p,a)
589 /*** IDirect3DViewport3 methods ***/
590 #define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->lpVtbl->SetBackgroundDepth2(p,a)
591 #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->lpVtbl->GetBackgroundDepth2(p,a,b)
592 #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->lpVtbl->Clear2(p,a,b,c,d,e,f)
597 /*****************************************************************************
598 * IDirect3DExecuteBuffer interface
600 #define INTERFACE IDirect3DExecuteBuffer
601 #define IDirect3DExecuteBuffer_METHODS \
603 STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DEXECUTEBUFFERDESC lpDesc) PURE; \
604 STDMETHOD(Lock)(THIS_ LPD3DEXECUTEBUFFERDESC lpDesc) PURE; \
605 STDMETHOD(Unlock)(THIS) PURE; \
606 STDMETHOD(SetExecuteData)(THIS_ LPD3DEXECUTEDATA lpData) PURE; \
607 STDMETHOD(GetExecuteData)(THIS_ LPD3DEXECUTEDATA lpData) PURE; \
608 STDMETHOD(Validate)(THIS_ LPDWORD lpdwOffset, LPD3DVALIDATECALLBACK lpFunc, LPVOID lpUserArg, DWORD dwReserved) PURE; \
609 STDMETHOD(Optimize)(THIS_ DWORD dwDummy) PURE;
610 ICOM_DEFINE(IDirect3DExecuteBuffer,IUnknown)
614 /*** IUnknown methods ***/
615 #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
616 #define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
617 #define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
618 /*** IDirect3DExecuteBuffer methods ***/
619 #define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
620 #define IDirect3DExecuteBuffer_Lock(p,a) (p)->lpVtbl->Lock(p,a)
621 #define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
622 #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a)
623 #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a)
624 #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d)
625 #define IDirect3DExecuteBuffer_Optimize(p,a) (p)->lpVtbl->Optimize(p,a)
629 /*****************************************************************************
630 * IDirect3DDevice interface
632 #define INTERFACE IDirect3DDevice
633 #define IDirect3DDevice_METHODS \
635 STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D, LPGUID lpGUID, LPD3DDEVICEDESC lpD3DDVDesc) PURE; \
636 STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE; \
637 STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE lpD3Dtex1, LPDIRECT3DTEXTURE lpD3DTex2) PURE; \
638 STDMETHOD(CreateExecuteBuffer)(THIS_ LPD3DEXECUTEBUFFERDESC lpDesc, LPDIRECT3DEXECUTEBUFFER *lplpDirect3DExecuteBuffer, IUnknown *pUnkOuter) PURE; \
639 STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE; \
640 STDMETHOD(Execute)(THIS_ LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags) PURE; \
641 STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport) PURE; \
642 STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport) PURE; \
643 STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport, LPDIRECT3DVIEWPORT *lplpDirect3DViewport, DWORD dwFlags) PURE; \
644 STDMETHOD(Pick)(THIS_ LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags, LPD3DRECT lpRect) PURE; \
645 STDMETHOD(GetPickRecords)(THIS_ LPDWORD lpCount, LPD3DPICKRECORD lpD3DPickRec) PURE; \
646 STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc, LPVOID lpArg) PURE; \
647 STDMETHOD(CreateMatrix)(THIS_ LPD3DMATRIXHANDLE lpD3DMatHandle) PURE; \
648 STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle, LPD3DMATRIX lpD3DMatrix) PURE; \
649 STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle, LPD3DMATRIX lpD3DMatrix) PURE; \
650 STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle) PURE; \
651 STDMETHOD(BeginScene)(THIS) PURE; \
652 STDMETHOD(EndScene)(THIS) PURE; \
653 STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D *lplpDirect3D) PURE;
654 ICOM_DEFINE(IDirect3DDevice,IUnknown)
658 /*** IUnknown methods ***/
659 #define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
660 #define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
661 #define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
662 /*** IDirect3DDevice methods ***/
663 #define IDirect3DDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
664 #define IDirect3DDevice_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
665 #define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
666 #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c)
667 #define IDirect3DDevice_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
668 #define IDirect3DDevice_Execute(p,a,b,c) (p)->lpVtbl->Execute(p,a,b,c)
669 #define IDirect3DDevice_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
670 #define IDirect3DDevice_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
671 #define IDirect3DDevice_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
672 #define IDirect3DDevice_Pick(p,a,b,c,d) (p)->lpVtbl->Pick(p,a,b,c,d)
673 #define IDirect3DDevice_GetPickRecords(p,a,b) (p)->lpVtbl->GetPickRecords(p,a,b)
674 #define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
675 #define IDirect3DDevice_CreateMatrix(p,a) (p)->lpVtbl->CreateMatrix(p,a)
676 #define IDirect3DDevice_SetMatrix(p,a,b) (p)->lpVtbl->SetMatrix(p,a,b)
677 #define IDirect3DDevice_GetMatrix(p,a,b) (p)->lpVtbl->GetMatrix(p,a,b)
678 #define IDirect3DDevice_DeleteMatrix(p,a) (p)->lpVtbl->DeleteMatrix(p,a)
679 #define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
680 #define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
681 #define IDirect3DDevice_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
685 /*****************************************************************************
686 * IDirect3DDevice2 interface
688 #define INTERFACE IDirect3DDevice2
689 #define IDirect3DDevice2_METHODS \
691 STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE; \
692 STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE2 lpD3DTex1, LPDIRECT3DTEXTURE2 lpD3DTex2) PURE; \
693 STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE; \
694 STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE; \
695 STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE; \
696 STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2, LPDIRECT3DVIEWPORT2 *lplpDirect3DViewport2, DWORD dwFlags) PURE; \
697 STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc, LPVOID lpArg) PURE; \
698 STDMETHOD(BeginScene)(THIS) PURE; \
699 STDMETHOD(EndScene)(THIS) PURE; \
700 STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D2 *lplpDirect3D2) PURE; \
701 /*** DrawPrimitive API ***/ \
702 STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE; \
703 STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 *lplpDirect3DViewport2) PURE; \
704 STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE lpNewRenderTarget, DWORD dwFlags) PURE; \
705 STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE *lplpRenderTarget) PURE; \
706 STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE d3dpt,D3DVERTEXTYPE dwVertexTypeDesc,DWORD dwFlags) PURE; \
707 STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags) PURE; \
708 STDMETHOD(Vertex)(THIS_ LPVOID lpVertexType) PURE; \
709 STDMETHOD(Index)(THIS_ WORD wVertexIndex) PURE; \
710 STDMETHOD(End)(THIS_ DWORD dwFlags) PURE; \
711 STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE; \
712 STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE; \
713 STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState) PURE; \
714 STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState) PURE; \
715 STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; \
716 STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; \
717 STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; \
718 STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE; \
719 STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE; \
720 STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; \
721 STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE;
722 ICOM_DEFINE(IDirect3DDevice2,IUnknown)
726 /*** IUnknown methods ***/
727 #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
728 #define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
729 #define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p)
730 /*** IDirect3DDevice2 methods ***/
731 #define IDirect3DDevice2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
732 #define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
733 #define IDirect3DDevice2_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
734 #define IDirect3DDevice2_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
735 #define IDirect3DDevice2_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
736 #define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
737 #define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
738 #define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p)
739 #define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p)
740 #define IDirect3DDevice2_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
741 #define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
742 #define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
743 #define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
744 #define IDirect3DDevice2_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
745 #define IDirect3DDevice2_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
746 #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
747 #define IDirect3DDevice2_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
748 #define IDirect3DDevice2_Index(p,a) (p)->lpVtbl->Index(p,a)
749 #define IDirect3DDevice2_End(p,a) (p)->lpVtbl->End(p,a)
750 #define IDirect3DDevice2_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
751 #define IDirect3DDevice2_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
752 #define IDirect3DDevice2_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
753 #define IDirect3DDevice2_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
754 #define IDirect3DDevice2_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
755 #define IDirect3DDevice2_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
756 #define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
757 #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
758 #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
759 #define IDirect3DDevice2_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
760 #define IDirect3DDevice2_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
763 /*****************************************************************************
764 * IDirect3DDevice3 interface
766 #define INTERFACE IDirect3DDevice3
767 #define IDirect3DDevice3_METHODS \
769 STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE; \
770 STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE; \
771 STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE; \
772 STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE; \
773 STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3, LPDIRECT3DVIEWPORT3 *lplpDirect3DViewport3, DWORD dwFlags) PURE; \
774 STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc, LPVOID lpArg) PURE; \
775 STDMETHOD(BeginScene)(THIS) PURE; \
776 STDMETHOD(EndScene)(THIS) PURE; \
777 STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D3 *lplpDirect3D3) PURE; \
778 /*** DrawPrimitive API ***/ \
779 STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE; \
780 STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 *lplpDirect3DViewport3) PURE; \
781 STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 lpNewRenderTarget, DWORD dwFlags) PURE; \
782 STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 *lplpRenderTarget) PURE; \
783 STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexTypeDesc, DWORD dwFlags) PURE; \
784 STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags) PURE; \
785 STDMETHOD(Vertex)(THIS_ LPVOID lpVertexType) PURE; \
786 STDMETHOD(Index)(THIS_ WORD wVertexIndex) PURE; \
787 STDMETHOD(End)(THIS_ DWORD dwFlags) PURE; \
788 STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE; \
789 STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE; \
790 STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState) PURE; \
791 STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState) PURE; \
792 STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; \
793 STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; \
794 STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; \
795 STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE; \
796 STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE; \
797 STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; \
798 STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; \
799 STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,DWORD dwFlags) PURE; \
800 STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,LPWORD lpIndex,DWORD dwIndexCount,DWORD dwFlags) PURE; \
801 STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,DWORD dwFlags) PURE; \
802 STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf,LPWORD lpwIndices,DWORD dwIndexCount,DWORD dwFlags) PURE; \
803 STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR lpCenters,LPD3DVALUE lpRadii,DWORD dwNumSpheres,DWORD dwFlags,LPDWORD lpdwReturnValues) PURE; \
804 STDMETHOD(GetTexture)(THIS_ DWORD dwStage,LPDIRECT3DTEXTURE2 *lplpTexture2) PURE; \
805 STDMETHOD(SetTexture)(THIS_ DWORD dwStage,LPDIRECT3DTEXTURE2 lpTexture2) PURE; \
806 STDMETHOD(GetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,LPDWORD lpdwState) PURE; \
807 STDMETHOD(SetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,DWORD dwState) PURE; \
808 STDMETHOD(ValidateDevice)(THIS_ LPDWORD lpdwPasses) PURE;
809 ICOM_DEFINE(IDirect3DDevice3,IUnknown)
813 /*** IUnknown methods ***/
814 #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
815 #define IDirect3DDevice3_AddRef(p) (p)->lpVtbl->AddRef(p)
816 #define IDirect3DDevice3_Release(p) (p)->lpVtbl->Release(p)
817 /*** IDirect3DDevice3 methods ***/
818 #define IDirect3DDevice3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
819 #define IDirect3DDevice3_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
820 #define IDirect3DDevice3_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
821 #define IDirect3DDevice3_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
822 #define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
823 #define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
824 #define IDirect3DDevice3_BeginScene(p) (p)->lpVtbl->BeginScene(p)
825 #define IDirect3DDevice3_EndScene(p) (p)->lpVtbl->EndScene(p)
826 #define IDirect3DDevice3_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
827 #define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
828 #define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
829 #define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
830 #define IDirect3DDevice3_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
831 #define IDirect3DDevice3_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
832 #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
833 #define IDirect3DDevice3_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
834 #define IDirect3DDevice3_Index(p,a) (p)->lpVtbl->Index(p,a)
835 #define IDirect3DDevice3_End(p,a) (p)->lpVtbl->End(p,a)
836 #define IDirect3DDevice3_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
837 #define IDirect3DDevice3_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
838 #define IDirect3DDevice3_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
839 #define IDirect3DDevice3_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
840 #define IDirect3DDevice3_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
841 #define IDirect3DDevice3_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
842 #define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
843 #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
844 #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
845 #define IDirect3DDevice3_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
846 #define IDirect3DDevice3_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
847 #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
848 #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
849 #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
850 #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e)
851 #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
852 #define IDirect3DDevice3_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
853 #define IDirect3DDevice3_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
854 #define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
855 #define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
856 #define IDirect3DDevice3_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
859 /*****************************************************************************
860 * IDirect3DDevice7 interface
862 #define INTERFACE IDirect3DDevice7
863 #define IDirect3DDevice7_METHODS \
865 STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC7 lpD3DHELDevDesc) PURE; \
866 STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc, LPVOID lpArg) PURE; \
867 STDMETHOD(BeginScene)(THIS) PURE; \
868 STDMETHOD(EndScene)(THIS) PURE; \
869 STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D7 *lplpDirect3D3) PURE; \
870 STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 lpNewRenderTarget,DWORD dwFlags) PURE; \
871 STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 *lplpRenderTarget) PURE; \
872 STDMETHOD(Clear)(THIS_ DWORD dwCount,LPD3DRECT lpRects,DWORD dwFlags,D3DCOLOR dwColor,D3DVALUE dvZ,DWORD dwStencil) PURE; \
873 STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; \
874 STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE; \
875 STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT7 lpData) PURE; \
876 STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType,LPD3DMATRIX lpD3DMatrix) PURE; \
877 STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT7 lpData) PURE; \
878 STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL7 lpMat) PURE; \
879 STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL7 lpMat) PURE; \
880 STDMETHOD(SetLight)(THIS_ DWORD dwLightIndex,LPD3DLIGHT7 lpLight) PURE; \
881 STDMETHOD(GetLight)(THIS_ DWORD dwLightIndex,LPD3DLIGHT7 lpLight) PURE; \
882 STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE; \
883 STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE; \
884 STDMETHOD(BeginStateBlock)(THIS) PURE; \
885 STDMETHOD(EndStateBlock)(THIS_ LPDWORD lpdwBlockHandle) PURE; \
886 STDMETHOD(PreLoad)(THIS_ LPDIRECTDRAWSURFACE7 lpddsTexture) PURE; \
887 STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE; \
888 STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE; \
889 STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; \
890 STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE; \
891 STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,DWORD dwFlags) PURE; \
892 STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,LPWORD lpIndex,DWORD dwIndexCount,DWORD dwFlags) PURE; \
893 STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,DWORD dwFlags) PURE; \
894 STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,LPWORD lpwIndices,DWORD dwIndexCount,DWORD dwFlags) PURE; \
895 STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR lpCenters,LPD3DVALUE lpRadii,DWORD dwNumSpheres,DWORD dwFlags,LPDWORD lpdwReturnValues) PURE; \
896 STDMETHOD(GetTexture)(THIS_ DWORD dwStage,LPDIRECTDRAWSURFACE7 *lpTexture) PURE; \
897 STDMETHOD(SetTexture)(THIS_ DWORD dwStage,LPDIRECTDRAWSURFACE7 lpTexture) PURE; \
898 STDMETHOD(GetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,LPDWORD lpdwState) PURE; \
899 STDMETHOD(SetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,DWORD dwState) PURE; \
900 STDMETHOD(ValidateDevice)(THIS_ LPDWORD lpdwPasses) PURE; \
901 STDMETHOD(ApplyStateBlock)(THIS_ DWORD dwBlockHandle) PURE; \
902 STDMETHOD(CaptureStateBlock)(THIS_ DWORD dwBlockHandle) PURE; \
903 STDMETHOD(DeleteStateBlock)(THIS_ DWORD dwBlockHandle) PURE; \
904 STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE d3dsbType,LPDWORD lpdwBlockHandle) PURE; \
905 STDMETHOD(Load)(THIS_ LPDIRECTDRAWSURFACE7 lpDestTex,LPPOINT lpDestPoint,LPDIRECTDRAWSURFACE7 lpSrcTex,LPRECT lprcSrcRect,DWORD dwFlags) PURE; \
906 STDMETHOD(LightEnable)(THIS_ DWORD dwLightIndex,BOOL bEnable) PURE; \
907 STDMETHOD(GetLightEnable)(THIS_ DWORD dwLightIndex,BOOL *pbEnable) PURE; \
908 STDMETHOD(SetClipPlane)(THIS_ DWORD dwIndex,D3DVALUE *pPlaneEquation) PURE; \
909 STDMETHOD(GetClipPlane)(THIS_ DWORD dwIndex,D3DVALUE *pPlaneEquation) PURE; \
910 STDMETHOD(GetInfo)(THIS_ DWORD dwDevInfoID,LPVOID pDevInfoStruct,DWORD dwSize) PURE;
911 ICOM_DEFINE(IDirect3DDevice7,IUnknown)
915 #define IDirect3DDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
916 #define IDirect3DDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
917 #define IDirect3DDevice7_Release(p) (p)->lpVtbl->Release(p)
918 #define IDirect3DDevice7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
919 #define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
920 #define IDirect3DDevice7_BeginScene(p) (p)->lpVtbl->BeginScene(p)
921 #define IDirect3DDevice7_EndScene(p) (p)->lpVtbl->EndScene(p)
922 #define IDirect3DDevice7_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
923 #define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
924 #define IDirect3DDevice7_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
925 #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
926 #define IDirect3DDevice7_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
927 #define IDirect3DDevice7_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
928 #define IDirect3DDevice7_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
929 #define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
930 #define IDirect3DDevice7_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
931 #define IDirect3DDevice7_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
932 #define IDirect3DDevice7_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
933 #define IDirect3DDevice7_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
934 #define IDirect3DDevice7_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b)
935 #define IDirect3DDevice7_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
936 #define IDirect3DDevice7_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
937 #define IDirect3DDevice7_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p)
938 #define IDirect3DDevice7_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a)
939 #define IDirect3DDevice7_PreLoad(p,a) (p)->lpVtbl->PreLoad(p,a)
940 #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
941 #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
942 #define IDirect3DDevice7_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
943 #define IDirect3DDevice7_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
944 #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
945 #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
946 #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
947 #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g)
948 #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
949 #define IDirect3DDevice7_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
950 #define IDirect3DDevice7_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
951 #define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
952 #define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
953 #define IDirect3DDevice7_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
954 #define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a)
955 #define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a)
956 #define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a)
957 #define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b)
958 #define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->lpVtbl->Load(p,a,b,c,d,e)
959 #define IDirect3DDevice7_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b)
960 #define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b)
961 #define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b)
962 #define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b)
963 #define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c)
968 /*****************************************************************************
969 * IDirect3DVertexBuffer interface
971 #define INTERFACE IDirect3DVertexBuffer
972 #define IDirect3DVertexBuffer_METHODS \
974 STDMETHOD(Lock)(THIS_ DWORD dwFlags,LPVOID *lplpData,LPDWORD lpdwSize) PURE; \
975 STDMETHOD(Unlock)(THIS) PURE; \
976 STDMETHOD(ProcessVertices)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPDIRECT3DVERTEXBUFFER lpSrcBuffer,DWORD dwSrcIndex,LPDIRECT3DDEVICE3 lpD3DDevice,DWORD dwFlags) PURE; \
977 STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertexBufferDesc) PURE; \
978 STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE3 lpD3DDevice,DWORD dwFlags) PURE;
979 ICOM_DEFINE(IDirect3DVertexBuffer,IUnknown)
983 /*** IUnknown methods ***/
984 #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
985 #define IDirect3DVertexBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
986 #define IDirect3DVertexBuffer_Release(p) (p)->lpVtbl->Release(p)
987 /*** IDirect3DVertexBuffer methods ***/
988 #define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
989 #define IDirect3DVertexBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
990 #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
991 #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
992 #define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
995 /*****************************************************************************
996 * IDirect3DVertexBuffer7 interface
998 #define INTERFACE IDirect3DVertexBuffer7
999 #define IDirect3DVertexBuffer7_METHODS \
1001 STDMETHOD(Lock)(THIS_ DWORD dwFlags,LPVOID *lplpData,LPDWORD lpdwSize) PURE; \
1002 STDMETHOD(Unlock)(THIS) PURE; \
1003 STDMETHOD(ProcessVertices)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPDIRECT3DVERTEXBUFFER7 lpSrcBuffer,DWORD dwSrcIndex,LPDIRECT3DDEVICE7 lpD3DDevice,DWORD dwFlags) PURE; \
1004 STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertexBufferDesc) PURE; \
1005 STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE7 lpD3DDevice,DWORD dwFlags) PURE; \
1006 STDMETHOD(ProcessVerticesStrided)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPD3DDRAWPRIMITIVESTRIDEDDATA lpStrideData,DWORD dwVertexTypeDesc,LPDIRECT3DDEVICE7 lpD3DDevice,DWORD dwFlags) PURE;
1007 ICOM_DEFINE(IDirect3DVertexBuffer7,IUnknown)
1011 /*** IUnknown methods ***/
1012 #define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1013 #define IDirect3DVertexBuffer7_AddRef(p) (p)->lpVtbl->AddRef(p)
1014 #define IDirect3DVertexBuffer7_Release(p) (p)->lpVtbl->Release(p)
1015 /*** IDirect3DVertexBuffer7 methods ***/
1016 #define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
1017 #define IDirect3DVertexBuffer7_Unlock(p) (p)->lpVtbl->Unlock(p)
1018 #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
1019 #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
1020 #define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
1021 #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVerticesStrided(p,a,b,c,d,e,f,g)
1024 #endif /* __WINE_D3D_H */