mshtml: Removed code duplication in frame collection tests.
[wine] / include / d3d.h
1 /*
2  * Copyright (C) the Wine project
3  *
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.
8  *
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.
13  *
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #ifndef __WINE_D3D_H
20 #define __WINE_D3D_H
21
22 #include <stdlib.h>
23
24 #define COM_NO_WINDOWS_H
25 #include <objbase.h>
26 #include <d3dtypes.h> /* must precede d3dcaps.h */
27 #include <d3dcaps.h>
28
29 /*****************************************************************************
30  * Predeclare the interfaces
31  */
32 DEFINE_GUID(IID_IDirect3D,              0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
33 DEFINE_GUID(IID_IDirect3D2,             0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
34 DEFINE_GUID(IID_IDirect3D3,             0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
35 DEFINE_GUID(IID_IDirect3D7,             0xf5049e77,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
36
37 DEFINE_GUID(IID_IDirect3DRampDevice,    0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
38 DEFINE_GUID(IID_IDirect3DRGBDevice,     0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
39 DEFINE_GUID(IID_IDirect3DHALDevice,     0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
40 DEFINE_GUID(IID_IDirect3DMMXDevice,     0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
41 DEFINE_GUID(IID_IDirect3DRefDevice,     0x50936643,0x13e9,0x11d1,0x89,0xaa,0x00,0xa0,0xc9,0x05,0x41,0x29);
42 DEFINE_GUID(IID_IDirect3DTnLHalDevice,  0xf5049e78,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
43 DEFINE_GUID(IID_IDirect3DNullDevice,    0x8767df22,0xbacc,0x11d1,0x89,0x69,0x00,0xa0,0xc9,0x06,0x29,0xa8);
44
45 DEFINE_GUID(IID_IDirect3DDevice,        0x64108800,0x957d,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
46 DEFINE_GUID(IID_IDirect3DDevice2,       0x93281501,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
47 DEFINE_GUID(IID_IDirect3DDevice3,       0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
48 DEFINE_GUID(IID_IDirect3DDevice7,       0xf5049e79,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
49
50 DEFINE_GUID(IID_IDirect3DTexture,       0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
51 DEFINE_GUID(IID_IDirect3DTexture2,      0x93281502,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
52
53 DEFINE_GUID(IID_IDirect3DLight,         0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
54
55 DEFINE_GUID(IID_IDirect3DMaterial,      0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
56 DEFINE_GUID(IID_IDirect3DMaterial2,     0x93281503,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
57 DEFINE_GUID(IID_IDirect3DMaterial3,     0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x00,0x60,0x08,0x52,0xb3,0x12);
58
59 DEFINE_GUID(IID_IDirect3DExecuteBuffer, 0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
60
61 DEFINE_GUID(IID_IDirect3DViewport,      0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
62 DEFINE_GUID(IID_IDirect3DViewport2,     0x93281500,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
63 DEFINE_GUID(IID_IDirect3DViewport3,     0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
64
65 DEFINE_GUID(IID_IDirect3DVertexBuffer,  0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x00,0xa0,0xc9,0x03,0x67,0xf8);
66 DEFINE_GUID(IID_IDirect3DVertexBuffer7, 0xf5049e7d,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
67
68
69 typedef struct IDirect3D *LPDIRECT3D;
70 typedef struct IDirect3D2 *LPDIRECT3D2;
71 typedef struct IDirect3D3 *LPDIRECT3D3;
72 typedef struct IDirect3D7 *LPDIRECT3D7;
73
74 typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
75
76 typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
77 typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
78 typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
79 typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
80
81 typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
82 typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
83 typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
84
85 typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
86 typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
87 typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
88
89 typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
90 typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
91
92 typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
93
94 typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
95 typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
96
97 /* ********************************************************************
98    Error Codes
99    ******************************************************************** */
100 #define D3D_OK                          DD_OK
101 #define D3DERR_BADMAJORVERSION          MAKE_DDHRESULT(700)
102 #define D3DERR_BADMINORVERSION          MAKE_DDHRESULT(701)
103 #define D3DERR_INVALID_DEVICE           MAKE_DDHRESULT(705)
104 #define D3DERR_INITFAILED               MAKE_DDHRESULT(706)
105 #define D3DERR_DEVICEAGGREGATED         MAKE_DDHRESULT(707)
106 #define D3DERR_EXECUTE_CREATE_FAILED    MAKE_DDHRESULT(710)
107 #define D3DERR_EXECUTE_DESTROY_FAILED   MAKE_DDHRESULT(711)
108 #define D3DERR_EXECUTE_LOCK_FAILED      MAKE_DDHRESULT(712)
109 #define D3DERR_EXECUTE_UNLOCK_FAILED    MAKE_DDHRESULT(713)
110 #define D3DERR_EXECUTE_LOCKED           MAKE_DDHRESULT(714)
111 #define D3DERR_EXECUTE_NOT_LOCKED       MAKE_DDHRESULT(715)
112 #define D3DERR_EXECUTE_FAILED           MAKE_DDHRESULT(716)
113 #define D3DERR_EXECUTE_CLIPPED_FAILED   MAKE_DDHRESULT(717)
114 #define D3DERR_TEXTURE_NO_SUPPORT       MAKE_DDHRESULT(720)
115 #define D3DERR_TEXTURE_CREATE_FAILED    MAKE_DDHRESULT(721)
116 #define D3DERR_TEXTURE_DESTROY_FAILED   MAKE_DDHRESULT(722)
117 #define D3DERR_TEXTURE_LOCK_FAILED      MAKE_DDHRESULT(723)
118 #define D3DERR_TEXTURE_UNLOCK_FAILED    MAKE_DDHRESULT(724)
119 #define D3DERR_TEXTURE_LOAD_FAILED      MAKE_DDHRESULT(725)
120 #define D3DERR_TEXTURE_SWAP_FAILED      MAKE_DDHRESULT(726)
121 #define D3DERR_TEXTURE_LOCKED           MAKE_DDHRESULT(727)
122 #define D3DERR_TEXTURE_NOT_LOCKED       MAKE_DDHRESULT(728)
123 #define D3DERR_TEXTURE_GETSURF_FAILED   MAKE_DDHRESULT(729)
124 #define D3DERR_MATRIX_CREATE_FAILED     MAKE_DDHRESULT(730)
125 #define D3DERR_MATRIX_DESTROY_FAILED    MAKE_DDHRESULT(731)
126 #define D3DERR_MATRIX_SETDATA_FAILED    MAKE_DDHRESULT(732)
127 #define D3DERR_MATRIX_GETDATA_FAILED    MAKE_DDHRESULT(733)
128 #define D3DERR_SETVIEWPORTDATA_FAILED   MAKE_DDHRESULT(734)
129 #define D3DERR_INVALIDCURRENTVIEWPORT   MAKE_DDHRESULT(735)
130 #define D3DERR_INVALIDPRIMITIVETYPE     MAKE_DDHRESULT(736)
131 #define D3DERR_INVALIDVERTEXTYPE        MAKE_DDHRESULT(737)
132 #define D3DERR_TEXTURE_BADSIZE          MAKE_DDHRESULT(738)
133 #define D3DERR_INVALIDRAMPTEXTURE       MAKE_DDHRESULT(739)
134 #define D3DERR_MATERIAL_CREATE_FAILED   MAKE_DDHRESULT(740)
135 #define D3DERR_MATERIAL_DESTROY_FAILED  MAKE_DDHRESULT(741)
136 #define D3DERR_MATERIAL_SETDATA_FAILED  MAKE_DDHRESULT(742)
137 #define D3DERR_MATERIAL_GETDATA_FAILED  MAKE_DDHRESULT(743)
138 #define D3DERR_INVALIDPALETTE           MAKE_DDHRESULT(744)
139 #define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
140 #define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY  MAKE_DDHRESULT(746)
141 #define D3DERR_SURFACENOTINVIDMEM       MAKE_DDHRESULT(747)
142 #define D3DERR_LIGHT_SET_FAILED         MAKE_DDHRESULT(750)
143 #define D3DERR_LIGHTHASVIEWPORT         MAKE_DDHRESULT(751)
144 #define D3DERR_LIGHTNOTINTHISVIEWPORT   MAKE_DDHRESULT(752)
145 #define D3DERR_SCENE_IN_SCENE           MAKE_DDHRESULT(760)
146 #define D3DERR_SCENE_NOT_IN_SCENE       MAKE_DDHRESULT(761)
147 #define D3DERR_SCENE_BEGIN_FAILED       MAKE_DDHRESULT(762)
148 #define D3DERR_SCENE_END_FAILED         MAKE_DDHRESULT(763)
149 #define D3DERR_INBEGIN                  MAKE_DDHRESULT(770)
150 #define D3DERR_NOTINBEGIN               MAKE_DDHRESULT(771)
151 #define D3DERR_NOVIEWPORTS              MAKE_DDHRESULT(772)
152 #define D3DERR_VIEWPORTDATANOTSET       MAKE_DDHRESULT(773)
153 #define D3DERR_VIEWPORTHASNODEVICE      MAKE_DDHRESULT(774)
154 #define D3DERR_NOCURRENTVIEWPORT        MAKE_DDHRESULT(775)
155 #define D3DERR_INVALIDVERTEXFORMAT      MAKE_DDHRESULT(2048)
156 #define D3DERR_COLORKEYATTACHED         MAKE_DDHRESULT(2050)
157 #define D3DERR_VERTEXBUFFEROPTIMIZED    MAKE_DDHRESULT(2060)
158 #define D3DERR_VBUF_CREATE_FAILED       MAKE_DDHRESULT(2061)
159 #define D3DERR_VERTEXBUFFERLOCKED       MAKE_DDHRESULT(2062)
160 #define D3DERR_VERTEXBUFFERUNLOCKFAILED MAKE_DDHRESULT(2063)
161 #define D3DERR_ZBUFFER_NOTPRESENT       MAKE_DDHRESULT(2070)
162 #define D3DERR_STENCILBUFFER_NOTPRESENT MAKE_DDHRESULT(2071)
163
164 #define D3DERR_WRONGTEXTUREFORMAT               MAKE_DDHRESULT(2072)
165 #define D3DERR_UNSUPPORTEDCOLOROPERATION        MAKE_DDHRESULT(2073)
166 #define D3DERR_UNSUPPORTEDCOLORARG              MAKE_DDHRESULT(2074)
167 #define D3DERR_UNSUPPORTEDALPHAOPERATION        MAKE_DDHRESULT(2075)
168 #define D3DERR_UNSUPPORTEDALPHAARG              MAKE_DDHRESULT(2076)
169 #define D3DERR_TOOMANYOPERATIONS                MAKE_DDHRESULT(2077)
170 #define D3DERR_CONFLICTINGTEXTUREFILTER         MAKE_DDHRESULT(2078)
171 #define D3DERR_UNSUPPORTEDFACTORVALUE           MAKE_DDHRESULT(2079)
172 #define D3DERR_CONFLICTINGRENDERSTATE           MAKE_DDHRESULT(2081)
173 #define D3DERR_UNSUPPORTEDTEXTUREFILTER         MAKE_DDHRESULT(2082)
174 #define D3DERR_TOOMANYPRIMITIVES                MAKE_DDHRESULT(2083)
175 #define D3DERR_INVALIDMATRIX                    MAKE_DDHRESULT(2084)
176 #define D3DERR_TOOMANYVERTICES                  MAKE_DDHRESULT(2085)
177 #define D3DERR_CONFLICTINGTEXTUREPALETTE        MAKE_DDHRESULT(2086)
178
179 #define D3DERR_INVALIDSTATEBLOCK        MAKE_DDHRESULT(2100)
180 #define D3DERR_INBEGINSTATEBLOCK        MAKE_DDHRESULT(2101)
181 #define D3DERR_NOTINBEGINSTATEBLOCK     MAKE_DDHRESULT(2102)
182
183 /* ********************************************************************
184    Enums
185    ******************************************************************** */
186 #define D3DNEXT_NEXT __MSABI_LONG(0x01)
187 #define D3DNEXT_HEAD __MSABI_LONG(0x02)
188 #define D3DNEXT_TAIL __MSABI_LONG(0x04)
189
190 #define D3DDP_WAIT               __MSABI_LONG(0x00000001)
191 #define D3DDP_OUTOFORDER         __MSABI_LONG(0x00000002)
192 #define D3DDP_DONOTCLIP          __MSABI_LONG(0x00000004)
193 #define D3DDP_DONOTUPDATEEXTENTS __MSABI_LONG(0x00000008)
194 #define D3DDP_DONOTLIGHT         __MSABI_LONG(0x00000010)
195
196 /* ********************************************************************
197    Types and structures
198    ******************************************************************** */
199 typedef DWORD D3DVIEWPORTHANDLE, *LPD3DVIEWPORTHANDLE;
200
201
202 /*****************************************************************************
203  * IDirect3D interface
204  */
205 #undef INTERFACE
206 #define INTERFACE IDirect3D
207 DECLARE_INTERFACE_(IDirect3D,IUnknown)
208 {
209     /*** IUnknown methods ***/
210     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
211     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
212     STDMETHOD_(ULONG,Release)(THIS) PURE;
213     /*** IDirect3D methods ***/
214     STDMETHOD(Initialize)(THIS_ REFIID riid) PURE;
215     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE;
216     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE;
217     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL *lplpDirect3DMaterial, IUnknown *pUnkOuter) PURE;
218     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT *lplpD3DViewport, IUnknown *pUnkOuter) PURE;
219     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lplpD3DDevice) PURE;
220 };
221 #undef INTERFACE
222
223 #if !defined(__cplusplus) || defined(CINTERFACE)
224 /*** IUnknown methods ***/
225 #define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
226 #define IDirect3D_AddRef(p)             (p)->lpVtbl->AddRef(p)
227 #define IDirect3D_Release(p)            (p)->lpVtbl->Release(p)
228 /*** IDirect3D methods ***/
229 #define IDirect3D_Initialize(p,a)       (p)->lpVtbl->Initialize(p,a)
230 #define IDirect3D_EnumDevices(p,a,b)    (p)->lpVtbl->EnumDevices(p,a,b)
231 #define IDirect3D_CreateLight(p,a,b)    (p)->lpVtbl->CreateLight(p,a,b)
232 #define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
233 #define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
234 #define IDirect3D_FindDevice(p,a,b)     (p)->lpVtbl->FindDevice(p,a,b)
235 #else
236 /*** IUnknown methods ***/
237 #define IDirect3D_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
238 #define IDirect3D_AddRef(p)             (p)->AddRef()
239 #define IDirect3D_Release(p)            (p)->Release()
240 /*** IDirect3D methods ***/
241 #define IDirect3D_Initialize(p,a)       (p)->Initialize(a)
242 #define IDirect3D_EnumDevices(p,a,b)    (p)->EnumDevices(a,b)
243 #define IDirect3D_CreateLight(p,a,b)    (p)->CreateLight(a,b)
244 #define IDirect3D_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
245 #define IDirect3D_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
246 #define IDirect3D_FindDevice(p,a,b)     (p)->FindDevice(a,b)
247 #endif
248
249
250 /*****************************************************************************
251  * IDirect3D2 interface
252  */
253 #define INTERFACE IDirect3D2
254 DECLARE_INTERFACE_(IDirect3D2,IUnknown)
255 {
256     /*** IUnknown methods ***/
257     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
258     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
259     STDMETHOD_(ULONG,Release)(THIS) PURE;
260     /*** IDirect3D2 methods ***/
261     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE;
262     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE;
263     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL2 *lplpDirect3DMaterial2, IUnknown *pUnkOuter) PURE;
264     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT2 *lplpD3DViewport2, IUnknown *pUnkOuter) PURE;
265     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lpD3DFDR) PURE;
266     STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid, LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DDEVICE2 *lplpD3DDevice2) PURE;
267 };
268 #undef INTERFACE
269
270 #if !defined(__cplusplus) || defined(CINTERFACE)
271 /*** IUnknown methods ***/
272 #define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
273 #define IDirect3D2_AddRef(p)             (p)->lpVtbl->AddRef(p)
274 #define IDirect3D2_Release(p)            (p)->lpVtbl->Release(p)
275 /*** IDirect3D2 methods ***/
276 #define IDirect3D2_EnumDevices(p,a,b)    (p)->lpVtbl->EnumDevices(p,a,b)
277 #define IDirect3D2_CreateLight(p,a,b)    (p)->lpVtbl->CreateLight(p,a,b)
278 #define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
279 #define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
280 #define IDirect3D2_FindDevice(p,a,b)     (p)->lpVtbl->FindDevice(p,a,b)
281 #define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
282 #else
283 /*** IUnknown methods ***/
284 #define IDirect3D2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
285 #define IDirect3D2_AddRef(p)             (p)->AddRef()
286 #define IDirect3D2_Release(p)            (p)->Release()
287 /*** IDirect3D2 methods ***/
288 #define IDirect3D2_EnumDevices(p,a,b)    (p)->EnumDevices(a,b)
289 #define IDirect3D2_CreateLight(p,a,b)    (p)->CreateLight(a,b)
290 #define IDirect3D2_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
291 #define IDirect3D2_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
292 #define IDirect3D2_FindDevice(p,a,b)     (p)->FindDevice(a,b)
293 #define IDirect3D2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
294 #endif
295
296
297 /*****************************************************************************
298  * IDirect3D3 interface
299  */
300 #define INTERFACE IDirect3D3
301 DECLARE_INTERFACE_(IDirect3D3,IUnknown)
302 {
303     /*** IUnknown methods ***/
304     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
305     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
306     STDMETHOD_(ULONG,Release)(THIS) PURE;
307     /*** IDirect3D3 methods ***/
308     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback, LPVOID lpUserArg) PURE;
309     STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT *lplpDirect3DLight, IUnknown *pUnkOuter) PURE;
310     STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL3 *lplpDirect3DMaterial3, IUnknown *pUnkOuter) PURE;
311     STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT3 *lplpD3DViewport3, IUnknown *pUnkOuter) PURE;
312     STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH lpD3DDFS, LPD3DFINDDEVICERESULT lpD3DFDR) PURE;
313     STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid,LPDIRECTDRAWSURFACE4 lpDDS, LPDIRECT3DDEVICE3 *lplpD3DDevice3,LPUNKNOWN lpUnk) PURE;
314     STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER *lplpD3DVertBuf,DWORD dwFlags,LPUNKNOWN lpUnk) PURE;
315     STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID riidDevice,LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext) PURE;
316     STDMETHOD(EvictManagedTextures)(THIS) PURE;
317 };
318 #undef INTERFACE
319
320 #if !defined(__cplusplus) || defined(CINTERFACE)
321 /*** IUnknown methods ***/
322 #define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
323 #define IDirect3D3_AddRef(p)             (p)->lpVtbl->AddRef(p)
324 #define IDirect3D3_Release(p)            (p)->lpVtbl->Release(p)
325 /*** IDirect3D3 methods ***/
326 #define IDirect3D3_EnumDevices(p,a,b)            (p)->lpVtbl->EnumDevices(p,a,b)
327 #define IDirect3D3_CreateLight(p,a,b)            (p)->lpVtbl->CreateLight(p,a,b)
328 #define IDirect3D3_CreateMaterial(p,a,b)         (p)->lpVtbl->CreateMaterial(p,a,b)
329 #define IDirect3D3_CreateViewport(p,a,b)         (p)->lpVtbl->CreateViewport(p,a,b)
330 #define IDirect3D3_FindDevice(p,a,b)             (p)->lpVtbl->FindDevice(p,a,b)
331 #define IDirect3D3_CreateDevice(p,a,b,c,d)       (p)->lpVtbl->CreateDevice(p,a,b,c,d)
332 #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d)
333 #define IDirect3D3_EnumZBufferFormats(p,a,b,c)   (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
334 #define IDirect3D3_EvictManagedTextures(p)       (p)->lpVtbl->EvictManagedTextures(p)
335 #else
336 /*** IUnknown methods ***/
337 #define IDirect3D3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
338 #define IDirect3D3_AddRef(p)             (p)->AddRef()
339 #define IDirect3D3_Release(p)            (p)->Release()
340 /*** IDirect3D3 methods ***/
341 #define IDirect3D3_EnumDevices(p,a,b)            (p)->EnumDevices(a,b)
342 #define IDirect3D3_CreateLight(p,a,b)            (p)->CreateLight(a,b)
343 #define IDirect3D3_CreateMaterial(p,a,b)         (p)->CreateMaterial(a,b)
344 #define IDirect3D3_CreateViewport(p,a,b)         (p)->CreateViewport(a,b)
345 #define IDirect3D3_FindDevice(p,a,b)             (p)->FindDevice(a,b)
346 #define IDirect3D3_CreateDevice(p,a,b,c,d)       (p)->CreateDevice(a,b,c,d)
347 #define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->CreateVertexBuffer(a,b,c,d)
348 #define IDirect3D3_EnumZBufferFormats(p,a,b,c)   (p)->EnumZBufferFormats(a,b,c)
349 #define IDirect3D3_EvictManagedTextures(p)       (p)->EvictManagedTextures()
350 #endif
351
352 /*****************************************************************************
353  * IDirect3D7 interface
354  */
355 #define INTERFACE IDirect3D7
356 DECLARE_INTERFACE_(IDirect3D7,IUnknown)
357 {
358     /*** IUnknown methods ***/
359     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
360     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
361     STDMETHOD_(ULONG,Release)(THIS) PURE;
362     /*** IDirect3D7 methods ***/
363     STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback, LPVOID lpUserArg) PURE;
364     STDMETHOD(CreateDevice)(THIS_ REFCLSID rclsid,LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 *lplpD3DDevice) PURE;
365     STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER7 *lplpD3DVertBuf,DWORD dwFlags) PURE;
366     STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID riidDevice,LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext) PURE;
367     STDMETHOD(EvictManagedTextures)(THIS) PURE;
368 };
369 #undef INTERFACE
370
371 #if !defined(__cplusplus) || defined(CINTERFACE)
372 /*** IUnknown methods ***/
373 #define IDirect3D7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
374 #define IDirect3D7_AddRef(p)             (p)->lpVtbl->AddRef(p)
375 #define IDirect3D7_Release(p)            (p)->lpVtbl->Release(p)
376 /*** IDirect3D3 methods ***/
377 #define IDirect3D7_EnumDevices(p,a,b)            (p)->lpVtbl->EnumDevices(p,a,b)
378 #define IDirect3D7_CreateDevice(p,a,b,c)         (p)->lpVtbl->CreateDevice(p,a,b,c)
379 #define IDirect3D7_CreateVertexBuffer(p,a,b,c)   (p)->lpVtbl->CreateVertexBuffer(p,a,b,c)
380 #define IDirect3D7_EnumZBufferFormats(p,a,b,c)   (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
381 #define IDirect3D7_EvictManagedTextures(p)       (p)->lpVtbl->EvictManagedTextures(p)
382 #else
383 /*** IUnknown methods ***/
384 #define IDirect3D7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
385 #define IDirect3D7_AddRef(p)             (p)->AddRef()
386 #define IDirect3D7_Release(p)            (p)->Release()
387 /*** IDirect3D3 methods ***/
388 #define IDirect3D7_EnumDevices(p,a,b)            (p)->EnumDevices(a,b)
389 #define IDirect3D7_CreateDevice(p,a,b,c)         (p)->CreateDevice(a,b,c)
390 #define IDirect3D7_CreateVertexBuffer(p,a,b,c)   (p)->CreateVertexBuffer(a,b,c)
391 #define IDirect3D7_EnumZBufferFormats(p,a,b,c)   (p)->EnumZBufferFormats(a,b,c)
392 #define IDirect3D7_EvictManagedTextures(p)       (p)->EvictManagedTextures()
393 #endif
394
395
396 /*****************************************************************************
397  * IDirect3DLight interface
398  */
399 #define INTERFACE IDirect3DLight
400 DECLARE_INTERFACE_(IDirect3DLight,IUnknown)
401 {
402     /*** IUnknown methods ***/
403     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
404     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
405     STDMETHOD_(ULONG,Release)(THIS) PURE;
406     /*** IDirect3DLight methods ***/
407     STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE;
408     STDMETHOD(SetLight)(THIS_ LPD3DLIGHT lpLight) PURE;
409     STDMETHOD(GetLight)(THIS_ LPD3DLIGHT lpLight) PURE;
410 };
411 #undef INTERFACE
412
413 #if !defined(__cplusplus) || defined(CINTERFACE)
414 /*** IUnknown methods ***/
415 #define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
416 #define IDirect3DLight_AddRef(p)             (p)->lpVtbl->AddRef(p)
417 #define IDirect3DLight_Release(p)            (p)->lpVtbl->Release(p)
418 /*** IDirect3DLight methods ***/
419 #define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
420 #define IDirect3DLight_SetLight(p,a)   (p)->lpVtbl->SetLight(p,a)
421 #define IDirect3DLight_GetLight(p,a)   (p)->lpVtbl->GetLight(p,a)
422 #else
423 /*** IUnknown methods ***/
424 #define IDirect3DLight_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
425 #define IDirect3DLight_AddRef(p)             (p)->AddRef()
426 #define IDirect3DLight_Release(p)            (p)->Release()
427 /*** IDirect3DLight methods ***/
428 #define IDirect3DLight_Initialize(p,a) (p)->Initialize(a)
429 #define IDirect3DLight_SetLight(p,a)   (p)->SetLight(a)
430 #define IDirect3DLight_GetLight(p,a)   (p)->GetLight(a)
431 #endif
432
433
434 /*****************************************************************************
435  * IDirect3DMaterial interface
436  */
437 #define INTERFACE IDirect3DMaterial
438 DECLARE_INTERFACE_(IDirect3DMaterial,IUnknown)
439 {
440     /*** IUnknown methods ***/
441     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
442     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
443     STDMETHOD_(ULONG,Release)(THIS) PURE;
444     /*** IDirect3DMaterial methods ***/
445     STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE;
446     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE;
447     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE;
448     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DMATERIALHANDLE lpHandle) PURE;
449     STDMETHOD(Reserve)(THIS) PURE;
450     STDMETHOD(Unreserve)(THIS) PURE;
451 };
452 #undef INTERFACE
453
454 #if !defined(__cplusplus) || defined(CINTERFACE)
455 /*** IUnknown methods ***/
456 #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
457 #define IDirect3DMaterial_AddRef(p)             (p)->lpVtbl->AddRef(p)
458 #define IDirect3DMaterial_Release(p)            (p)->lpVtbl->Release(p)
459 /*** IDirect3DMaterial methods ***/
460 #define IDirect3DMaterial_Initialize(p,a)  (p)->lpVtbl->Initialize(p,a)
461 #define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
462 #define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
463 #define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
464 #define IDirect3DMaterial_Reserve(p)       (p)->lpVtbl->Reserve(p)
465 #define IDirect3DMaterial_Unreserve(p)     (p)->lpVtbl->Unreserve(p)
466 #else
467 /*** IUnknown methods ***/
468 #define IDirect3DMaterial_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
469 #define IDirect3DMaterial_AddRef(p)             (p)->AddRef()
470 #define IDirect3DMaterial_Release(p)            (p)->Release()
471 /*** IDirect3DMaterial methods ***/
472 #define IDirect3DMaterial_Initialize(p,a)  (p)->Initialize(a)
473 #define IDirect3DMaterial_SetMaterial(p,a) (p)->SetMaterial(a)
474 #define IDirect3DMaterial_GetMaterial(p,a) (p)->GetMaterial(a)
475 #define IDirect3DMaterial_GetHandle(p,a,b) (p)->GetHandle(a,b)
476 #define IDirect3DMaterial_Reserve(p)       (p)->Reserve()
477 #define IDirect3DMaterial_Unreserve(p)     (p)->Unreserve()
478 #endif
479
480
481 /*****************************************************************************
482  * IDirect3DMaterial2 interface
483  */
484 #define INTERFACE IDirect3DMaterial2
485 DECLARE_INTERFACE_(IDirect3DMaterial2,IUnknown)
486 {
487     /*** IUnknown methods ***/
488     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
489     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
490     STDMETHOD_(ULONG,Release)(THIS) PURE;
491     /*** IDirect3DMaterial2 methods ***/
492     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE;
493     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE;
494     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2 lpDirect3DDevice2, LPD3DMATERIALHANDLE lpHandle) PURE;
495 };
496 #undef INTERFACE
497
498 #if !defined(__cplusplus) || defined(CINTERFACE)
499 /*** IUnknown methods ***/
500 #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
501 #define IDirect3DMaterial2_AddRef(p)             (p)->lpVtbl->AddRef(p)
502 #define IDirect3DMaterial2_Release(p)            (p)->lpVtbl->Release(p)
503 /*** IDirect3DMaterial2 methods ***/
504 #define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
505 #define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
506 #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
507 #else
508 /*** IUnknown methods ***/
509 #define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
510 #define IDirect3DMaterial2_AddRef(p)             (p)->AddRef()
511 #define IDirect3DMaterial2_Release(p)            (p)->Release()
512 /*** IDirect3DMaterial2 methods ***/
513 #define IDirect3DMaterial2_SetMaterial(p,a) (p)->SetMaterial(a)
514 #define IDirect3DMaterial2_GetMaterial(p,a) (p)->GetMaterial(a)
515 #define IDirect3DMaterial2_GetHandle(p,a,b) (p)->GetHandle(a,b)
516 #endif
517
518
519 /*****************************************************************************
520  * IDirect3DMaterial3 interface
521  */
522 #define INTERFACE IDirect3DMaterial3
523 DECLARE_INTERFACE_(IDirect3DMaterial3,IUnknown)
524 {
525     /*** IUnknown methods ***/
526     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
527     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
528     STDMETHOD_(ULONG,Release)(THIS) PURE;
529     /*** IDirect3DMaterial3 methods ***/
530     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE;
531     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL lpMat) PURE;
532     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE3 lpDirect3DDevice3, LPD3DMATERIALHANDLE lpHandle) PURE;
533 };
534 #undef INTERFACE
535
536 #if !defined(__cplusplus) || defined(CINTERFACE)
537 /*** IUnknown methods ***/
538 #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
539 #define IDirect3DMaterial3_AddRef(p)             (p)->lpVtbl->AddRef(p)
540 #define IDirect3DMaterial3_Release(p)            (p)->lpVtbl->Release(p)
541 /*** IDirect3DMaterial3 methods ***/
542 #define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
543 #define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
544 #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
545 #else
546 /*** IUnknown methods ***/
547 #define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
548 #define IDirect3DMaterial3_AddRef(p)             (p)->AddRef()
549 #define IDirect3DMaterial3_Release(p)            (p)->Release()
550 /*** IDirect3DMaterial3 methods ***/
551 #define IDirect3DMaterial3_SetMaterial(p,a) (p)->SetMaterial(a)
552 #define IDirect3DMaterial3_GetMaterial(p,a) (p)->GetMaterial(a)
553 #define IDirect3DMaterial3_GetHandle(p,a,b) (p)->GetHandle(a,b)
554 #endif
555
556
557 /*****************************************************************************
558  * IDirect3DTexture interface
559  */
560 #define INTERFACE IDirect3DTexture
561 DECLARE_INTERFACE_(IDirect3DTexture,IUnknown)
562 {
563     /*** IUnknown methods ***/
564     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
565     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
566     STDMETHOD_(ULONG,Release)(THIS) PURE;
567     /*** IDirect3DTexture methods ***/
568     STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPDIRECTDRAWSURFACE lpDDSurface) PURE;
569     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DTEXTUREHANDLE  lpHandle) PURE;
570     STDMETHOD(PaletteChanged)(THIS_ DWORD dwStart, DWORD dwCount) PURE;
571     STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE lpD3DTexture) PURE;
572     STDMETHOD(Unload)(THIS) PURE;
573 };
574 #undef INTERFACE
575
576 #if !defined(__cplusplus) || defined(CINTERFACE)
577 /*** IUnknown methods ***/
578 #define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
579 #define IDirect3DTexture_AddRef(p)             (p)->lpVtbl->AddRef(p)
580 #define IDirect3DTexture_Release(p)            (p)->lpVtbl->Release(p)
581 /*** IDirect3DTexture methods ***/
582 #define IDirect3DTexture_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
583 #define IDirect3DTexture_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
584 #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
585 #define IDirect3DTexture_Load(p,a) (p)->lpVtbl->Load(p,a)
586 #define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
587 #else
588 /*** IUnknown methods ***/
589 #define IDirect3DTexture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
590 #define IDirect3DTexture_AddRef(p)             (p)->AddRef()
591 #define IDirect3DTexture_Release(p)            (p)->Release()
592 /*** IDirect3DTexture methods ***/
593 #define IDirect3DTexture_Initialize(p,a,b) (p)->Initialize(a,b)
594 #define IDirect3DTexture_GetHandle(p,a,b) (p)->GetHandle(a,b)
595 #define IDirect3DTexture_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
596 #define IDirect3DTexture_Load(p,a) (p)->Load(a)
597 #define IDirect3DTexture_Unload(p) (p)->Unload()
598 #endif
599
600
601 /*****************************************************************************
602  * IDirect3DTexture2 interface
603  */
604 #define INTERFACE IDirect3DTexture2
605 DECLARE_INTERFACE_(IDirect3DTexture2,IUnknown)
606 {
607     /*** IUnknown methods ***/
608     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
609     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
610     STDMETHOD_(ULONG,Release)(THIS) PURE;
611     /*** IDirect3DTexture2 methods ***/
612     STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2 lpDirect3DDevice2, LPD3DTEXTUREHANDLE lpHandle) PURE;
613     STDMETHOD(PaletteChanged)(THIS_ DWORD dwStart, DWORD dwCount) PURE;
614     STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE2 lpD3DTexture2) PURE;
615 };
616 #undef INTERFACE
617
618 #if !defined(__cplusplus) || defined(CINTERFACE)
619 /*** IUnknown methods ***/
620 #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
621 #define IDirect3DTexture2_AddRef(p)             (p)->lpVtbl->AddRef(p)
622 #define IDirect3DTexture2_Release(p)            (p)->lpVtbl->Release(p)
623 /*** IDirect3DTexture2 methods ***/
624 #define IDirect3DTexture2_GetHandle(p,a,b)      (p)->lpVtbl->GetHandle(p,a,b)
625 #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
626 #define IDirect3DTexture2_Load(p,a)             (p)->lpVtbl->Load(p,a)
627 #else
628 /*** IUnknown methods ***/
629 #define IDirect3DTexture2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
630 #define IDirect3DTexture2_AddRef(p)             (p)->AddRef()
631 #define IDirect3DTexture2_Release(p)            (p)->Release()
632 /*** IDirect3DTexture2 methods ***/
633 #define IDirect3DTexture2_GetHandle(p,a,b)      (p)->GetHandle(a,b)
634 #define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
635 #define IDirect3DTexture2_Load(p,a)             (p)->Load(a)
636 #endif
637
638
639 /*****************************************************************************
640  * IDirect3DViewport interface
641  */
642 #define INTERFACE IDirect3DViewport
643 DECLARE_INTERFACE_(IDirect3DViewport,IUnknown)
644 {
645     /*** IUnknown methods ***/
646     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
647     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
648     STDMETHOD_(ULONG,Release)(THIS) PURE;
649     /*** IDirect3DViewport methods ***/
650     STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE;
651     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE;
652     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE;
653     STDMETHOD(TransformVertices)(THIS_ DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffScreen) PURE;
654     STDMETHOD(LightElements)(THIS_ DWORD dwElementCount, LPD3DLIGHTDATA lpData) PURE;
655     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE;
656     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid) PURE;
657     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface) PURE;
658     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *lplpDDSurface, LPBOOL lpValid) PURE;
659     STDMETHOD(Clear)(THIS_ DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags) PURE;
660     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE;
661     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE;
662     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT *lplpDirect3DLight, DWORD dwFlags) PURE;
663 };
664 #undef INTERFACE
665
666 #if !defined(__cplusplus) || defined(CINTERFACE)
667 /*** IUnknown methods ***/
668 #define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
669 #define IDirect3DViewport_AddRef(p)             (p)->lpVtbl->AddRef(p)
670 #define IDirect3DViewport_Release(p)            (p)->lpVtbl->Release(p)
671 /*** IDirect3DViewport methods ***/
672 #define IDirect3DViewport_Initialize(p,a)              (p)->lpVtbl->Initialize(p,a)
673 #define IDirect3DViewport_GetViewport(p,a)             (p)->lpVtbl->GetViewport(p,a)
674 #define IDirect3DViewport_SetViewport(p,a)             (p)->lpVtbl->SetViewport(p,a)
675 #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
676 #define IDirect3DViewport_LightElements(p,a,b)         (p)->lpVtbl->LightElements(p,a,b)
677 #define IDirect3DViewport_SetBackground(p,a)           (p)->lpVtbl->SetBackground(p,a)
678 #define IDirect3DViewport_GetBackground(p,a,b)         (p)->lpVtbl->GetBackground(p,a,b)
679 #define IDirect3DViewport_SetBackgroundDepth(p,a)      (p)->lpVtbl->SetBackgroundDepth(p,a)
680 #define IDirect3DViewport_GetBackgroundDepth(p,a,b)    (p)->lpVtbl->GetBackgroundDepth(p,a,b)
681 #define IDirect3DViewport_Clear(p,a,b,c)               (p)->lpVtbl->Clear(p,a,b,c)
682 #define IDirect3DViewport_AddLight(p,a)                (p)->lpVtbl->AddLight(p,a)
683 #define IDirect3DViewport_DeleteLight(p,a)             (p)->lpVtbl->DeleteLight(p,a)
684 #define IDirect3DViewport_NextLight(p,a,b,c)           (p)->lpVtbl->NextLight(p,a,b,c)
685 #else
686 /*** IUnknown methods ***/
687 #define IDirect3DViewport_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
688 #define IDirect3DViewport_AddRef(p)             (p)->AddRef()
689 #define IDirect3DViewport_Release(p)            (p)->Release()
690 /*** IDirect3DViewport methods ***/
691 #define IDirect3DViewport_Initialize(p,a)              (p)->Initialize(a)
692 #define IDirect3DViewport_GetViewport(p,a)             (p)->GetViewport(a)
693 #define IDirect3DViewport_SetViewport(p,a)             (p)->SetViewport(a)
694 #define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
695 #define IDirect3DViewport_LightElements(p,a,b)         (p)->LightElements(a,b)
696 #define IDirect3DViewport_SetBackground(p,a)           (p)->SetBackground(a)
697 #define IDirect3DViewport_GetBackground(p,a,b)         (p)->GetBackground(a,b)
698 #define IDirect3DViewport_SetBackgroundDepth(p,a)      (p)->SetBackgroundDepth(a)
699 #define IDirect3DViewport_GetBackgroundDepth(p,a,b)    (p)->GetBackgroundDepth(a,b)
700 #define IDirect3DViewport_Clear(p,a,b,c)               (p)->Clear(a,b,c)
701 #define IDirect3DViewport_AddLight(p,a)                (p)->AddLight(a)
702 #define IDirect3DViewport_DeleteLight(p,a)             (p)->DeleteLight(a)
703 #define IDirect3DViewport_NextLight(p,a,b,c)           (p)->NextLight(a,b,c)
704 #endif
705
706
707 /*****************************************************************************
708  * IDirect3DViewport2 interface
709  */
710 #define INTERFACE IDirect3DViewport2
711 DECLARE_INTERFACE_(IDirect3DViewport2,IDirect3DViewport)
712 {
713     /*** IUnknown methods ***/
714     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
715     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
716     STDMETHOD_(ULONG,Release)(THIS) PURE;
717     /*** IDirect3DViewport methods ***/
718     STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE;
719     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE;
720     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE;
721     STDMETHOD(TransformVertices)(THIS_ DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffScreen) PURE;
722     STDMETHOD(LightElements)(THIS_ DWORD dwElementCount, LPD3DLIGHTDATA lpData) PURE;
723     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE;
724     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid) PURE;
725     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface) PURE;
726     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *lplpDDSurface, LPBOOL lpValid) PURE;
727     STDMETHOD(Clear)(THIS_ DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags) PURE;
728     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE;
729     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE;
730     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT *lplpDirect3DLight, DWORD dwFlags) PURE;
731     /*** IDirect3DViewport2 methods ***/
732     STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE;
733     STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE;
734 };
735 #undef INTERFACE
736
737 #if !defined(__cplusplus) || defined(CINTERFACE)
738 /*** IUnknown methods ***/
739 #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
740 #define IDirect3DViewport2_AddRef(p)             (p)->lpVtbl->AddRef(p)
741 #define IDirect3DViewport2_Release(p)            (p)->lpVtbl->Release(p)
742 /*** IDirect3Viewport methods ***/
743 #define IDirect3DViewport2_Initialize(p,a)              (p)->lpVtbl->Initialize(p,a)
744 #define IDirect3DViewport2_GetViewport(p,a)             (p)->lpVtbl->GetViewport(p,a)
745 #define IDirect3DViewport2_SetViewport(p,a)             (p)->lpVtbl->SetViewport(p,a)
746 #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
747 #define IDirect3DViewport2_LightElements(p,a,b)         (p)->lpVtbl->LightElements(p,a,b)
748 #define IDirect3DViewport2_SetBackground(p,a)           (p)->lpVtbl->SetBackground(p,a)
749 #define IDirect3DViewport2_GetBackground(p,a,b)         (p)->lpVtbl->GetBackground(p,a,b)
750 #define IDirect3DViewport2_SetBackgroundDepth(p,a)      (p)->lpVtbl->SetBackgroundDepth(p,a)
751 #define IDirect3DViewport2_GetBackgroundDepth(p,a,b)    (p)->lpVtbl->GetBackgroundDepth(p,a,b)
752 #define IDirect3DViewport2_Clear(p,a,b,c)               (p)->lpVtbl->Clear(p,a,b,c)
753 #define IDirect3DViewport2_AddLight(p,a)                (p)->lpVtbl->AddLight(p,a)
754 #define IDirect3DViewport2_DeleteLight(p,a)             (p)->lpVtbl->DeleteLight(p,a)
755 #define IDirect3DViewport2_NextLight(p,a,b,c)           (p)->lpVtbl->NextLight(p,a,b,c)
756 /*** IDirect3DViewport2 methods ***/
757 #define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
758 #define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
759 #else
760 /*** IUnknown methods ***/
761 #define IDirect3DViewport2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
762 #define IDirect3DViewport2_AddRef(p)             (p)->AddRef()
763 #define IDirect3DViewport2_Release(p)            (p)->Release()
764 /*** IDirect3Viewport methods ***/
765 #define IDirect3DViewport2_Initialize(p,a)              (p)->Initialize(a)
766 #define IDirect3DViewport2_GetViewport(p,a)             (p)->GetViewport(a)
767 #define IDirect3DViewport2_SetViewport(p,a)             (p)->SetViewport(a)
768 #define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
769 #define IDirect3DViewport2_LightElements(p,a,b)         (p)->LightElements(a,b)
770 #define IDirect3DViewport2_SetBackground(p,a)           (p)->SetBackground(a)
771 #define IDirect3DViewport2_GetBackground(p,a,b)         (p)->GetBackground(a,b)
772 #define IDirect3DViewport2_SetBackgroundDepth(p,a)      (p)->SetBackgroundDepth(a)
773 #define IDirect3DViewport2_GetBackgroundDepth(p,a,b)    (p)->GetBackgroundDepth(a,b)
774 #define IDirect3DViewport2_Clear(p,a,b,c)               (p)->Clear(a,b,c)
775 #define IDirect3DViewport2_AddLight(p,a)                (p)->AddLight(a)
776 #define IDirect3DViewport2_DeleteLight(p,a)             (p)->DeleteLight(a)
777 #define IDirect3DViewport2_NextLight(p,a,b,c)           (p)->NextLight(a,b,c)
778 /*** IDirect3DViewport2 methods ***/
779 #define IDirect3DViewport2_GetViewport2(p,a) (p)->GetViewport2(a)
780 #define IDirect3DViewport2_SetViewport2(p,a) (p)->SetViewport2(a)
781 #endif
782
783 /*****************************************************************************
784  * IDirect3DViewport3 interface
785  */
786 #define INTERFACE IDirect3DViewport3
787 DECLARE_INTERFACE_(IDirect3DViewport3,IDirect3DViewport2)
788 {
789     /*** IUnknown methods ***/
790     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
791     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
792     STDMETHOD_(ULONG,Release)(THIS) PURE;
793     /*** IDirect3DViewport methods ***/
794     STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D) PURE;
795     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE;
796     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT lpData) PURE;
797     STDMETHOD(TransformVertices)(THIS_ DWORD dwVertexCount, LPD3DTRANSFORMDATA lpData, DWORD dwFlags, LPDWORD lpOffScreen) PURE;
798     STDMETHOD(LightElements)(THIS_ DWORD dwElementCount, LPD3DLIGHTDATA lpData) PURE;
799     STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE hMat) PURE;
800     STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE lphMat, LPBOOL lpValid) PURE;
801     STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface) PURE;
802     STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *lplpDDSurface, LPBOOL lpValid) PURE;
803     STDMETHOD(Clear)(THIS_ DWORD dwCount, LPD3DRECT lpRects, DWORD dwFlags) PURE;
804     STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE;
805     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight) PURE;
806     STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT lpDirect3DLight, LPDIRECT3DLIGHT *lplpDirect3DLight, DWORD dwFlags) PURE;
807     /*** IDirect3DViewport2 methods ***/
808     STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE;
809     STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2 lpData) PURE;
810     /*** IDirect3DViewport3 methods ***/
811     STDMETHOD(SetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4 lpDDS) PURE;
812     STDMETHOD(GetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4 *lplpDDS,LPBOOL lpValid) PURE;
813     STDMETHOD(Clear2)(THIS_ DWORD dwCount,LPD3DRECT lpRects,DWORD dwFlags,DWORD dwColor,D3DVALUE dvZ,DWORD dwStencil) PURE;
814 };
815 #undef INTERFACE
816
817 #if !defined(__cplusplus) || defined(CINTERFACE)
818 /*** IUnknown methods ***/
819 #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
820 #define IDirect3DViewport3_AddRef(p)             (p)->lpVtbl->AddRef(p)
821 #define IDirect3DViewport3_Release(p)            (p)->lpVtbl->Release(p)
822 /*** IDirect3Viewport methods ***/
823 #define IDirect3DViewport3_Initialize(p,a)              (p)->lpVtbl->Initialize(p,a)
824 #define IDirect3DViewport3_GetViewport(p,a)             (p)->lpVtbl->GetViewport(p,a)
825 #define IDirect3DViewport3_SetViewport(p,a)             (p)->lpVtbl->SetViewport(p,a)
826 #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
827 #define IDirect3DViewport3_LightElements(p,a,b)         (p)->lpVtbl->LightElements(p,a,b)
828 #define IDirect3DViewport3_SetBackground(p,a)           (p)->lpVtbl->SetBackground(p,a)
829 #define IDirect3DViewport3_GetBackground(p,a,b)         (p)->lpVtbl->GetBackground(p,a,b)
830 #define IDirect3DViewport3_SetBackgroundDepth(p,a)      (p)->lpVtbl->SetBackgroundDepth(p,a)
831 #define IDirect3DViewport3_GetBackgroundDepth(p,a,b)    (p)->lpVtbl->GetBackgroundDepth(p,a,b)
832 #define IDirect3DViewport3_Clear(p,a,b,c)               (p)->lpVtbl->Clear(p,a,b,c)
833 #define IDirect3DViewport3_AddLight(p,a)                (p)->lpVtbl->AddLight(p,a)
834 #define IDirect3DViewport3_DeleteLight(p,a)             (p)->lpVtbl->DeleteLight(p,a)
835 #define IDirect3DViewport3_NextLight(p,a,b,c)           (p)->lpVtbl->NextLight(p,a,b,c)
836 /*** IDirect3DViewport2 methods ***/
837 #define IDirect3DViewport3_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
838 #define IDirect3DViewport3_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
839 /*** IDirect3DViewport3 methods ***/
840 #define IDirect3DViewport3_SetBackgroundDepth2(p,a)   (p)->lpVtbl->SetBackgroundDepth2(p,a)
841 #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->lpVtbl->GetBackgroundDepth2(p,a,b)
842 #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f)      (p)->lpVtbl->Clear2(p,a,b,c,d,e,f)
843 #else
844 /*** IUnknown methods ***/
845 #define IDirect3DViewport3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
846 #define IDirect3DViewport3_AddRef(p)             (p)->AddRef()
847 #define IDirect3DViewport3_Release(p)            (p)->Release()
848 /*** IDirect3Viewport methods ***/
849 #define IDirect3DViewport3_Initialize(p,a)              (p)->Initialize(a)
850 #define IDirect3DViewport3_GetViewport(p,a)             (p)->GetViewport(a)
851 #define IDirect3DViewport3_SetViewport(p,a)             (p)->SetViewport(a)
852 #define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
853 #define IDirect3DViewport3_LightElements(p,a,b)         (p)->LightElements(a,b)
854 #define IDirect3DViewport3_SetBackground(p,a)           (p)->SetBackground(a)
855 #define IDirect3DViewport3_GetBackground(p,a,b)         (p)->GetBackground(a,b)
856 #define IDirect3DViewport3_SetBackgroundDepth(p,a)      (p)->SetBackgroundDepth(a)
857 #define IDirect3DViewport3_GetBackgroundDepth(p,a,b)    (p)->GetBackgroundDepth(a,b)
858 #define IDirect3DViewport3_Clear(p,a,b,c)               (p)->Clear(a,b,c)
859 #define IDirect3DViewport3_AddLight(p,a)                (p)->AddLight(a)
860 #define IDirect3DViewport3_DeleteLight(p,a)             (p)->DeleteLight(a)
861 #define IDirect3DViewport3_NextLight(p,a,b,c)           (p)->NextLight(a,b,c)
862 /*** IDirect3DViewport2 methods ***/
863 #define IDirect3DViewport3_GetViewport2(p,a) (p)->GetViewport2(a)
864 #define IDirect3DViewport3_SetViewport2(p,a) (p)->SetViewport2(a)
865 /*** IDirect3DViewport3 methods ***/
866 #define IDirect3DViewport3_SetBackgroundDepth2(p,a)   (p)->SetBackgroundDepth2(a)
867 #define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->GetBackgroundDepth2(a,b)
868 #define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f)      (p)->Clear2(a,b,c,d,e,f)
869 #endif
870
871
872
873 /*****************************************************************************
874  * IDirect3DExecuteBuffer interface
875  */
876 #define INTERFACE IDirect3DExecuteBuffer
877 DECLARE_INTERFACE_(IDirect3DExecuteBuffer,IUnknown)
878 {
879     /*** IUnknown methods ***/
880     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
881     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
882     STDMETHOD_(ULONG,Release)(THIS) PURE;
883     /*** IDirect3DExecuteBuffer methods ***/
884     STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE lpDirect3DDevice, LPD3DEXECUTEBUFFERDESC lpDesc) PURE;
885     STDMETHOD(Lock)(THIS_ LPD3DEXECUTEBUFFERDESC lpDesc) PURE;
886     STDMETHOD(Unlock)(THIS) PURE;
887     STDMETHOD(SetExecuteData)(THIS_ LPD3DEXECUTEDATA lpData) PURE;
888     STDMETHOD(GetExecuteData)(THIS_ LPD3DEXECUTEDATA lpData) PURE;
889     STDMETHOD(Validate)(THIS_ LPDWORD lpdwOffset, LPD3DVALIDATECALLBACK lpFunc, LPVOID lpUserArg, DWORD dwReserved) PURE;
890     STDMETHOD(Optimize)(THIS_ DWORD dwDummy) PURE;
891 };
892 #undef INTERFACE
893
894 #if !defined(__cplusplus) || defined(CINTERFACE)
895 /*** IUnknown methods ***/
896 #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
897 #define IDirect3DExecuteBuffer_AddRef(p)             (p)->lpVtbl->AddRef(p)
898 #define IDirect3DExecuteBuffer_Release(p)            (p)->lpVtbl->Release(p)
899 /*** IDirect3DExecuteBuffer methods ***/
900 #define IDirect3DExecuteBuffer_Initialize(p,a,b)   (p)->lpVtbl->Initialize(p,a,b)
901 #define IDirect3DExecuteBuffer_Lock(p,a)           (p)->lpVtbl->Lock(p,a)
902 #define IDirect3DExecuteBuffer_Unlock(p)           (p)->lpVtbl->Unlock(p)
903 #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a)
904 #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a)
905 #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d)
906 #define IDirect3DExecuteBuffer_Optimize(p,a)       (p)->lpVtbl->Optimize(p,a)
907 #else
908 /*** IUnknown methods ***/
909 #define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
910 #define IDirect3DExecuteBuffer_AddRef(p)             (p)->AddRef()
911 #define IDirect3DExecuteBuffer_Release(p)            (p)->Release()
912 /*** IDirect3DExecuteBuffer methods ***/
913 #define IDirect3DExecuteBuffer_Initialize(p,a,b)   (p)->Initialize(a,b)
914 #define IDirect3DExecuteBuffer_Lock(p,a)           (p)->Lock(a)
915 #define IDirect3DExecuteBuffer_Unlock(p)           (p)->Unlock()
916 #define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->SetExecuteData(a)
917 #define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->GetExecuteData(a)
918 #define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->Validate(a,b,c,d)
919 #define IDirect3DExecuteBuffer_Optimize(p,a)       (p)->Optimize(a)
920 #endif
921
922
923 /*****************************************************************************
924  * IDirect3DDevice interface
925  */
926 #define INTERFACE IDirect3DDevice
927 DECLARE_INTERFACE_(IDirect3DDevice,IUnknown)
928 {
929     /*** IUnknown methods ***/
930     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
931     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
932     STDMETHOD_(ULONG,Release)(THIS) PURE;
933     /*** IDirect3DDevice methods ***/
934     STDMETHOD(Initialize)(THIS_ LPDIRECT3D lpDirect3D, LPGUID lpGUID, LPD3DDEVICEDESC lpD3DDVDesc) PURE;
935     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE;
936     STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE lpD3Dtex1, LPDIRECT3DTEXTURE lpD3DTex2) PURE;
937     STDMETHOD(CreateExecuteBuffer)(THIS_ LPD3DEXECUTEBUFFERDESC lpDesc, LPDIRECT3DEXECUTEBUFFER *lplpDirect3DExecuteBuffer, IUnknown *pUnkOuter) PURE;
938     STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE;
939     STDMETHOD(Execute)(THIS_ LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags) PURE;
940     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport) PURE;
941     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport) PURE;
942     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT lpDirect3DViewport, LPDIRECT3DVIEWPORT *lplpDirect3DViewport, DWORD dwFlags) PURE;
943     STDMETHOD(Pick)(THIS_ LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer, LPDIRECT3DVIEWPORT lpDirect3DViewport, DWORD dwFlags, LPD3DRECT lpRect) PURE;
944     STDMETHOD(GetPickRecords)(THIS_ LPDWORD lpCount, LPD3DPICKRECORD lpD3DPickRec) PURE;
945     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc, LPVOID lpArg) PURE;
946     STDMETHOD(CreateMatrix)(THIS_ LPD3DMATRIXHANDLE lpD3DMatHandle) PURE;
947     STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle, LPD3DMATRIX lpD3DMatrix) PURE;
948     STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle, LPD3DMATRIX lpD3DMatrix) PURE;
949     STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE D3DMatHandle) PURE;
950     STDMETHOD(BeginScene)(THIS) PURE;
951     STDMETHOD(EndScene)(THIS) PURE;
952     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D *lplpDirect3D) PURE;
953 };
954 #undef INTERFACE
955
956 #if !defined(__cplusplus) || defined(CINTERFACE)
957 /*** IUnknown methods ***/
958 #define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
959 #define IDirect3DDevice_AddRef(p)             (p)->lpVtbl->AddRef(p)
960 #define IDirect3DDevice_Release(p)            (p)->lpVtbl->Release(p)
961 /*** IDirect3DDevice methods ***/
962 #define IDirect3DDevice_Initialize(p,a,b,c)          (p)->lpVtbl->Initialize(p,a,b,c)
963 #define IDirect3DDevice_GetCaps(p,a,b)               (p)->lpVtbl->GetCaps(p,a,b)
964 #define IDirect3DDevice_SwapTextureHandles(p,a,b)    (p)->lpVtbl->SwapTextureHandles(p,a,b)
965 #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c)
966 #define IDirect3DDevice_GetStats(p,a)                (p)->lpVtbl->GetStats(p,a)
967 #define IDirect3DDevice_Execute(p,a,b,c)             (p)->lpVtbl->Execute(p,a,b,c)
968 #define IDirect3DDevice_AddViewport(p,a)             (p)->lpVtbl->AddViewport(p,a)
969 #define IDirect3DDevice_DeleteViewport(p,a)          (p)->lpVtbl->DeleteViewport(p,a)
970 #define IDirect3DDevice_NextViewport(p,a,b,c)        (p)->lpVtbl->NextViewport(p,a,b,c)
971 #define IDirect3DDevice_Pick(p,a,b,c,d)              (p)->lpVtbl->Pick(p,a,b,c,d)
972 #define IDirect3DDevice_GetPickRecords(p,a,b)        (p)->lpVtbl->GetPickRecords(p,a,b)
973 #define IDirect3DDevice_EnumTextureFormats(p,a,b)    (p)->lpVtbl->EnumTextureFormats(p,a,b)
974 #define IDirect3DDevice_CreateMatrix(p,a)            (p)->lpVtbl->CreateMatrix(p,a)
975 #define IDirect3DDevice_SetMatrix(p,a,b)             (p)->lpVtbl->SetMatrix(p,a,b)
976 #define IDirect3DDevice_GetMatrix(p,a,b)             (p)->lpVtbl->GetMatrix(p,a,b)
977 #define IDirect3DDevice_DeleteMatrix(p,a)            (p)->lpVtbl->DeleteMatrix(p,a)
978 #define IDirect3DDevice_BeginScene(p)                (p)->lpVtbl->BeginScene(p)
979 #define IDirect3DDevice_EndScene(p)                  (p)->lpVtbl->EndScene(p)
980 #define IDirect3DDevice_GetDirect3D(p,a)             (p)->lpVtbl->GetDirect3D(p,a)
981 #else
982 /*** IUnknown methods ***/
983 #define IDirect3DDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
984 #define IDirect3DDevice_AddRef(p)             (p)->AddRef()
985 #define IDirect3DDevice_Release(p)            (p)->Release()
986 /*** IDirect3DDevice methods ***/
987 #define IDirect3DDevice_Initialize(p,a,b,c)          (p)->Initialize(a,b,c)
988 #define IDirect3DDevice_GetCaps(p,a,b)               (p)->GetCaps(a,b)
989 #define IDirect3DDevice_SwapTextureHandles(p,a,b)    (p)->SwapTextureHandles(a,b)
990 #define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->CreateExecuteBuffer(a,b,c)
991 #define IDirect3DDevice_GetStats(p,a)                (p)->GetStats(a)
992 #define IDirect3DDevice_Execute(p,a,b,c)             (p)->Execute(a,b,c)
993 #define IDirect3DDevice_AddViewport(p,a)             (p)->AddViewport(a)
994 #define IDirect3DDevice_DeleteViewport(p,a)          (p)->DeleteViewport(a)
995 #define IDirect3DDevice_NextViewport(p,a,b,c)        (p)->NextViewport(a,b,c)
996 #define IDirect3DDevice_Pick(p,a,b,c,d)              (p)->Pick(a,b,c,d)
997 #define IDirect3DDevice_GetPickRecords(p,a,b)        (p)->GetPickRecords(a,b)
998 #define IDirect3DDevice_EnumTextureFormats(p,a,b)    (p)->EnumTextureFormats(a,b)
999 #define IDirect3DDevice_CreateMatrix(p,a)            (p)->CreateMatrix(a)
1000 #define IDirect3DDevice_SetMatrix(p,a,b)             (p)->SetMatrix(a,b)
1001 #define IDirect3DDevice_GetMatrix(p,a,b)             (p)->GetMatrix(a,b)
1002 #define IDirect3DDevice_DeleteMatrix(p,a)            (p)->DeleteMatrix(a)
1003 #define IDirect3DDevice_BeginScene(p)                (p)->BeginScene()
1004 #define IDirect3DDevice_EndScene(p)                  (p)->EndScene()
1005 #define IDirect3DDevice_GetDirect3D(p,a)             (p)->GetDirect3D(a)
1006 #endif
1007
1008
1009 /*****************************************************************************
1010  * IDirect3DDevice2 interface
1011  */
1012 #define INTERFACE IDirect3DDevice2
1013 DECLARE_INTERFACE_(IDirect3DDevice2,IUnknown)
1014 {
1015     /*** IUnknown methods ***/
1016     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1017     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1018     STDMETHOD_(ULONG,Release)(THIS) PURE;
1019     /*** IDirect3DDevice2 methods ***/
1020     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE;
1021     STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE2 lpD3DTex1, LPDIRECT3DTEXTURE2 lpD3DTex2) PURE;
1022     STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE;
1023     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE;
1024     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE;
1025     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2, LPDIRECT3DVIEWPORT2 *lplpDirect3DViewport2, DWORD dwFlags) PURE;
1026     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc, LPVOID lpArg) PURE;
1027     STDMETHOD(BeginScene)(THIS) PURE;
1028     STDMETHOD(EndScene)(THIS) PURE;
1029     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D2 *lplpDirect3D2) PURE;
1030     /*** DrawPrimitive API ***/
1031     STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 lpDirect3DViewport2) PURE;
1032     STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 *lplpDirect3DViewport2) PURE;
1033     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE lpNewRenderTarget, DWORD dwFlags) PURE;
1034     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE *lplpRenderTarget) PURE;
1035     STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE d3dpt,D3DVERTEXTYPE dwVertexTypeDesc,DWORD dwFlags) PURE;
1036     STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags) PURE;
1037     STDMETHOD(Vertex)(THIS_ LPVOID lpVertexType) PURE;
1038     STDMETHOD(Index)(THIS_ WORD wVertexIndex) PURE;
1039     STDMETHOD(End)(THIS_ DWORD dwFlags) PURE;
1040     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE;
1041     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE;
1042     STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState) PURE;
1043     STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState) PURE;
1044     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE;
1045     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE;
1046     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE;
1047     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE;
1048     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, D3DVERTEXTYPE d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE;
1049     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE;
1050     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE;
1051 };
1052 #undef INTERFACE
1053
1054 #if !defined(__cplusplus) || defined(CINTERFACE)
1055 /*** IUnknown methods ***/
1056 #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1057 #define IDirect3DDevice2_AddRef(p)             (p)->lpVtbl->AddRef(p)
1058 #define IDirect3DDevice2_Release(p)            (p)->lpVtbl->Release(p)
1059 /*** IDirect3DDevice2 methods ***/
1060 #define IDirect3DDevice2_GetCaps(p,a,b)                        (p)->lpVtbl->GetCaps(p,a,b)
1061 #define IDirect3DDevice2_SwapTextureHandles(p,a,b)             (p)->lpVtbl->SwapTextureHandles(p,a,b)
1062 #define IDirect3DDevice2_GetStats(p,a)                         (p)->lpVtbl->GetStats(p,a)
1063 #define IDirect3DDevice2_AddViewport(p,a)                      (p)->lpVtbl->AddViewport(p,a)
1064 #define IDirect3DDevice2_DeleteViewport(p,a)                   (p)->lpVtbl->DeleteViewport(p,a)
1065 #define IDirect3DDevice2_NextViewport(p,a,b,c)                 (p)->lpVtbl->NextViewport(p,a,b,c)
1066 #define IDirect3DDevice2_EnumTextureFormats(p,a,b)             (p)->lpVtbl->EnumTextureFormats(p,a,b)
1067 #define IDirect3DDevice2_BeginScene(p)                         (p)->lpVtbl->BeginScene(p)
1068 #define IDirect3DDevice2_EndScene(p)                           (p)->lpVtbl->EndScene(p)
1069 #define IDirect3DDevice2_GetDirect3D(p,a)                      (p)->lpVtbl->GetDirect3D(p,a)
1070 #define IDirect3DDevice2_SetCurrentViewport(p,a)               (p)->lpVtbl->SetCurrentViewport(p,a)
1071 #define IDirect3DDevice2_GetCurrentViewport(p,a)               (p)->lpVtbl->GetCurrentViewport(p,a)
1072 #define IDirect3DDevice2_SetRenderTarget(p,a,b)                (p)->lpVtbl->SetRenderTarget(p,a,b)
1073 #define IDirect3DDevice2_GetRenderTarget(p,a)                  (p)->lpVtbl->GetRenderTarget(p,a)
1074 #define IDirect3DDevice2_Begin(p,a,b,c)                        (p)->lpVtbl->Begin(p,a,b,c)
1075 #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e)             (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
1076 #define IDirect3DDevice2_Vertex(p,a)                           (p)->lpVtbl->Vertex(p,a)
1077 #define IDirect3DDevice2_Index(p,a)                            (p)->lpVtbl->Index(p,a)
1078 #define IDirect3DDevice2_End(p,a)                              (p)->lpVtbl->End(p,a)
1079 #define IDirect3DDevice2_GetRenderState(p,a,b)                 (p)->lpVtbl->GetRenderState(p,a,b)
1080 #define IDirect3DDevice2_SetRenderState(p,a,b)                 (p)->lpVtbl->SetRenderState(p,a,b)
1081 #define IDirect3DDevice2_GetLightState(p,a,b)                  (p)->lpVtbl->GetLightState(p,a,b)
1082 #define IDirect3DDevice2_SetLightState(p,a,b)                  (p)->lpVtbl->SetLightState(p,a,b)
1083 #define IDirect3DDevice2_SetTransform(p,a,b)                   (p)->lpVtbl->SetTransform(p,a,b)
1084 #define IDirect3DDevice2_GetTransform(p,a,b)                   (p)->lpVtbl->GetTransform(p,a,b)
1085 #define IDirect3DDevice2_MultiplyTransform(p,a,b)              (p)->lpVtbl->MultiplyTransform(p,a,b)
1086 #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e)            (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
1087 #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
1088 #define IDirect3DDevice2_SetClipStatus(p,a)                    (p)->lpVtbl->SetClipStatus(p,a)
1089 #define IDirect3DDevice2_GetClipStatus(p,a)                    (p)->lpVtbl->GetClipStatus(p,a)
1090 #else
1091 /*** IUnknown methods ***/
1092 #define IDirect3DDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1093 #define IDirect3DDevice2_AddRef(p)             (p)->AddRef()
1094 #define IDirect3DDevice2_Release(p)            (p)->Release()
1095 /*** IDirect3DDevice2 methods ***/
1096 #define IDirect3DDevice2_GetCaps(p,a,b)                        (p)->GetCaps(a,b)
1097 #define IDirect3DDevice2_SwapTextureHandles(p,a,b)             (p)->SwapTextureHandles(a,b)
1098 #define IDirect3DDevice2_GetStats(p,a)                         (p)->GetStats(a)
1099 #define IDirect3DDevice2_AddViewport(p,a)                      (p)->AddViewport(a)
1100 #define IDirect3DDevice2_DeleteViewport(p,a)                   (p)->DeleteViewport(a)
1101 #define IDirect3DDevice2_NextViewport(p,a,b,c)                 (p)->NextViewport(a,b,c)
1102 #define IDirect3DDevice2_EnumTextureFormats(p,a,b)             (p)->EnumTextureFormats(a,b)
1103 #define IDirect3DDevice2_BeginScene(p)                         (p)->BeginScene()
1104 #define IDirect3DDevice2_EndScene(p)                           (p)->EndScene()
1105 #define IDirect3DDevice2_GetDirect3D(p,a)                      (p)->GetDirect3D(a)
1106 #define IDirect3DDevice2_SetCurrentViewport(p,a)               (p)->SetCurrentViewport(a)
1107 #define IDirect3DDevice2_GetCurrentViewport(p,a)               (p)->GetCurrentViewport(a)
1108 #define IDirect3DDevice2_SetRenderTarget(p,a,b)                (p)->SetRenderTarget(a,b)
1109 #define IDirect3DDevice2_GetRenderTarget(p,a)                  (p)->GetRenderTarget(a)
1110 #define IDirect3DDevice2_Begin(p,a,b,c)                        (p)->Begin(a,b,c)
1111 #define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e)             (p)->BeginIndexed(a,b,c,d,e)
1112 #define IDirect3DDevice2_Vertex(p,a)                           (p)->Vertex(a)
1113 #define IDirect3DDevice2_Index(p,a)                            (p)->Index(a)
1114 #define IDirect3DDevice2_End(p,a)                              (p)->End(a)
1115 #define IDirect3DDevice2_GetRenderState(p,a,b)                 (p)->GetRenderState(a,b)
1116 #define IDirect3DDevice2_SetRenderState(p,a,b)                 (p)->SetRenderState(a,b)
1117 #define IDirect3DDevice2_GetLightState(p,a,b)                  (p)->GetLightState(a,b)
1118 #define IDirect3DDevice2_SetLightState(p,a,b)                  (p)->SetLightState(a,b)
1119 #define IDirect3DDevice2_SetTransform(p,a,b)                   (p)->SetTransform(a,b)
1120 #define IDirect3DDevice2_GetTransform(p,a,b)                   (p)->GetTransform(a,b)
1121 #define IDirect3DDevice2_MultiplyTransform(p,a,b)              (p)->MultiplyTransform(a,b)
1122 #define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e)            (p)->DrawPrimitive(a,b,c,d,e)
1123 #define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
1124 #define IDirect3DDevice2_SetClipStatus(p,a)                    (p)->SetClipStatus(a)
1125 #define IDirect3DDevice2_GetClipStatus(p,a)                    (p)->GetClipStatus(a)
1126 #endif
1127
1128 /*****************************************************************************
1129  * IDirect3DDevice3 interface
1130  */
1131 #define INTERFACE IDirect3DDevice3
1132 DECLARE_INTERFACE_(IDirect3DDevice3,IUnknown)
1133 {
1134     /*** IUnknown methods ***/
1135     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1136     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1137     STDMETHOD_(ULONG,Release)(THIS) PURE;
1138     /*** IDirect3DDevice3 methods ***/
1139     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC lpD3DHWDevDesc, LPD3DDEVICEDESC lpD3DHELDevDesc) PURE;
1140     STDMETHOD(GetStats)(THIS_ LPD3DSTATS lpD3DStats) PURE;
1141     STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE;
1142     STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE;
1143     STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3, LPDIRECT3DVIEWPORT3 *lplpDirect3DViewport3, DWORD dwFlags) PURE;
1144     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc, LPVOID lpArg) PURE;
1145     STDMETHOD(BeginScene)(THIS) PURE;
1146     STDMETHOD(EndScene)(THIS) PURE;
1147     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D3 *lplpDirect3D3) PURE;
1148     /*** DrawPrimitive API ***/
1149     STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 lpDirect3DViewport3) PURE;
1150     STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 *lplpDirect3DViewport3) PURE;
1151     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 lpNewRenderTarget, DWORD dwFlags) PURE;
1152     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 *lplpRenderTarget) PURE;
1153     STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexTypeDesc, DWORD dwFlags) PURE;
1154     STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwNumVertices, DWORD dwFlags) PURE;
1155     STDMETHOD(Vertex)(THIS_ LPVOID lpVertexType) PURE;
1156     STDMETHOD(Index)(THIS_ WORD wVertexIndex) PURE;
1157     STDMETHOD(End)(THIS_ DWORD dwFlags) PURE;
1158     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE;
1159     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE;
1160     STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, LPDWORD lpdwLightState) PURE;
1161     STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE dwLightStateType, DWORD dwLightState) PURE;
1162     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE;
1163     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE;
1164     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE;
1165     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE;
1166     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE;
1167     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE;
1168     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE;
1169     STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,DWORD dwFlags) PURE;
1170     STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,LPWORD lpIndex,DWORD dwIndexCount,DWORD dwFlags) PURE;
1171     STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,DWORD dwFlags) PURE;
1172     STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf,LPWORD lpwIndices,DWORD dwIndexCount,DWORD dwFlags) PURE;
1173     STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR lpCenters,LPD3DVALUE lpRadii,DWORD dwNumSpheres,DWORD dwFlags,LPDWORD lpdwReturnValues) PURE;
1174     STDMETHOD(GetTexture)(THIS_ DWORD dwStage,LPDIRECT3DTEXTURE2 *lplpTexture2) PURE;
1175     STDMETHOD(SetTexture)(THIS_ DWORD dwStage,LPDIRECT3DTEXTURE2 lpTexture2) PURE;
1176     STDMETHOD(GetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,LPDWORD lpdwState) PURE;
1177     STDMETHOD(SetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,DWORD dwState) PURE;
1178     STDMETHOD(ValidateDevice)(THIS_ LPDWORD lpdwPasses) PURE;
1179 };
1180 #undef INTERFACE
1181
1182 #if !defined(__cplusplus) || defined(CINTERFACE)
1183 /*** IUnknown methods ***/
1184 #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1185 #define IDirect3DDevice3_AddRef(p)             (p)->lpVtbl->AddRef(p)
1186 #define IDirect3DDevice3_Release(p)            (p)->lpVtbl->Release(p)
1187 /*** IDirect3DDevice3 methods ***/
1188 #define IDirect3DDevice3_GetCaps(p,a,b)                        (p)->lpVtbl->GetCaps(p,a,b)
1189 #define IDirect3DDevice3_GetStats(p,a)                         (p)->lpVtbl->GetStats(p,a)
1190 #define IDirect3DDevice3_AddViewport(p,a)                      (p)->lpVtbl->AddViewport(p,a)
1191 #define IDirect3DDevice3_DeleteViewport(p,a)                   (p)->lpVtbl->DeleteViewport(p,a)
1192 #define IDirect3DDevice3_NextViewport(p,a,b,c)                 (p)->lpVtbl->NextViewport(p,a,b,c)
1193 #define IDirect3DDevice3_EnumTextureFormats(p,a,b)             (p)->lpVtbl->EnumTextureFormats(p,a,b)
1194 #define IDirect3DDevice3_BeginScene(p)                         (p)->lpVtbl->BeginScene(p)
1195 #define IDirect3DDevice3_EndScene(p)                           (p)->lpVtbl->EndScene(p)
1196 #define IDirect3DDevice3_GetDirect3D(p,a)                      (p)->lpVtbl->GetDirect3D(p,a)
1197 #define IDirect3DDevice3_SetCurrentViewport(p,a)               (p)->lpVtbl->SetCurrentViewport(p,a)
1198 #define IDirect3DDevice3_GetCurrentViewport(p,a)               (p)->lpVtbl->GetCurrentViewport(p,a)
1199 #define IDirect3DDevice3_SetRenderTarget(p,a,b)                (p)->lpVtbl->SetRenderTarget(p,a,b)
1200 #define IDirect3DDevice3_GetRenderTarget(p,a)                  (p)->lpVtbl->GetRenderTarget(p,a)
1201 #define IDirect3DDevice3_Begin(p,a,b,c)                        (p)->lpVtbl->Begin(p,a,b,c)
1202 #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e)             (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
1203 #define IDirect3DDevice3_Vertex(p,a)                           (p)->lpVtbl->Vertex(p,a)
1204 #define IDirect3DDevice3_Index(p,a)                            (p)->lpVtbl->Index(p,a)
1205 #define IDirect3DDevice3_End(p,a)                              (p)->lpVtbl->End(p,a)
1206 #define IDirect3DDevice3_GetRenderState(p,a,b)                 (p)->lpVtbl->GetRenderState(p,a,b)
1207 #define IDirect3DDevice3_SetRenderState(p,a,b)                 (p)->lpVtbl->SetRenderState(p,a,b)
1208 #define IDirect3DDevice3_GetLightState(p,a,b)                  (p)->lpVtbl->GetLightState(p,a,b)
1209 #define IDirect3DDevice3_SetLightState(p,a,b)                  (p)->lpVtbl->SetLightState(p,a,b)
1210 #define IDirect3DDevice3_SetTransform(p,a,b)                   (p)->lpVtbl->SetTransform(p,a,b)
1211 #define IDirect3DDevice3_GetTransform(p,a,b)                   (p)->lpVtbl->GetTransform(p,a,b)
1212 #define IDirect3DDevice3_MultiplyTransform(p,a,b)              (p)->lpVtbl->MultiplyTransform(p,a,b)
1213 #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e)            (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
1214 #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
1215 #define IDirect3DDevice3_SetClipStatus(p,a)                    (p)->lpVtbl->SetClipStatus(p,a)
1216 #define IDirect3DDevice3_GetClipStatus(p,a)                    (p)->lpVtbl->GetClipStatus(p,a)
1217 #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e)     (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
1218 #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
1219 #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e)          (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
1220 #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e)   (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e)
1221 #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e)  (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
1222 #define IDirect3DDevice3_GetTexture(p,a,b)                     (p)->lpVtbl->GetTexture(p,a,b)
1223 #define IDirect3DDevice3_SetTexture(p,a,b)                     (p)->lpVtbl->SetTexture(p,a,b)
1224 #define IDirect3DDevice3_GetTextureStageState(p,a,b,c)         (p)->lpVtbl->GetTextureStageState(p,a,b,c)
1225 #define IDirect3DDevice3_SetTextureStageState(p,a,b,c)         (p)->lpVtbl->SetTextureStageState(p,a,b,c)
1226 #define IDirect3DDevice3_ValidateDevice(p,a)                   (p)->lpVtbl->ValidateDevice(p,a)
1227 #else
1228 /*** IUnknown methods ***/
1229 #define IDirect3DDevice3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1230 #define IDirect3DDevice3_AddRef(p)             (p)->AddRef()
1231 #define IDirect3DDevice3_Release(p)            (p)->Release()
1232 /*** IDirect3DDevice3 methods ***/
1233 #define IDirect3DDevice3_GetCaps(p,a,b)                        (p)->GetCaps(a,b)
1234 #define IDirect3DDevice3_GetStats(p,a)                         (p)->GetStats(a)
1235 #define IDirect3DDevice3_AddViewport(p,a)                      (p)->AddViewport(a)
1236 #define IDirect3DDevice3_DeleteViewport(p,a)                   (p)->DeleteViewport(a)
1237 #define IDirect3DDevice3_NextViewport(p,a,b,c)                 (p)->NextViewport(a,b,c)
1238 #define IDirect3DDevice3_EnumTextureFormats(p,a,b)             (p)->EnumTextureFormats(a,b)
1239 #define IDirect3DDevice3_BeginScene(p)                         (p)->BeginScene()
1240 #define IDirect3DDevice3_EndScene(p)                           (p)->EndScene()
1241 #define IDirect3DDevice3_GetDirect3D(p,a)                      (p)->GetDirect3D(a)
1242 #define IDirect3DDevice3_SetCurrentViewport(p,a)               (p)->SetCurrentViewport(a)
1243 #define IDirect3DDevice3_GetCurrentViewport(p,a)               (p)->GetCurrentViewport(a)
1244 #define IDirect3DDevice3_SetRenderTarget(p,a,b)                (p)->SetRenderTarget(a,b)
1245 #define IDirect3DDevice3_GetRenderTarget(p,a)                  (p)->GetRenderTarget(a)
1246 #define IDirect3DDevice3_Begin(p,a,b,c)                        (p)->Begin(a,b,c)
1247 #define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e)             (p)->BeginIndexed(a,b,c,d,e)
1248 #define IDirect3DDevice3_Vertex(p,a)                           (p)->Vertex(a)
1249 #define IDirect3DDevice3_Index(p,a)                            (p)->Index(a)
1250 #define IDirect3DDevice3_End(p,a)                              (p)->End(a)
1251 #define IDirect3DDevice3_GetRenderState(p,a,b)                 (p)->GetRenderState(a,b)
1252 #define IDirect3DDevice3_SetRenderState(p,a,b)                 (p)->SetRenderState(a,b)
1253 #define IDirect3DDevice3_GetLightState(p,a,b)                  (p)->GetLightState(a,b)
1254 #define IDirect3DDevice3_SetLightState(p,a,b)                  (p)->SetLightState(a,b)
1255 #define IDirect3DDevice3_SetTransform(p,a,b)                   (p)->SetTransform(a,b)
1256 #define IDirect3DDevice3_GetTransform(p,a,b)                   (p)->GetTransform(a,b)
1257 #define IDirect3DDevice3_MultiplyTransform(p,a,b)              (p)->MultiplyTransform(a,b)
1258 #define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e)            (p)->DrawPrimitive(a,b,c,d,e)
1259 #define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
1260 #define IDirect3DDevice3_SetClipStatus(p,a)                    (p)->SetClipStatus(a)
1261 #define IDirect3DDevice3_GetClipStatus(p,a)                    (p)->GetClipStatus(a)
1262 #define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e)     (p)->DrawPrimitiveStrided(a,b,c,d,e)
1263 #define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
1264 #define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e)          (p)->DrawPrimitiveVB(a,b,c,d,e)
1265 #define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e)   (p)->DrawIndexedPrimitiveVB(a,b,c,d,e)
1266 #define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e)  (p)->ComputeSphereVisibility(a,b,c,d,e)
1267 #define IDirect3DDevice3_GetTexture(p,a,b)                     (p)->GetTexture(a,b)
1268 #define IDirect3DDevice3_SetTexture(p,a,b)                     (p)->SetTexture(a,b)
1269 #define IDirect3DDevice3_GetTextureStageState(p,a,b,c)         (p)->GetTextureStageState(a,b,c)
1270 #define IDirect3DDevice3_SetTextureStageState(p,a,b,c)         (p)->SetTextureStageState(a,b,c)
1271 #define IDirect3DDevice3_ValidateDevice(p,a)                   (p)->ValidateDevice(a)
1272 #endif
1273
1274 /*****************************************************************************
1275  * IDirect3DDevice7 interface
1276  */
1277 #define INTERFACE IDirect3DDevice7
1278 DECLARE_INTERFACE_(IDirect3DDevice7,IUnknown)
1279 {
1280     /*** IUnknown methods ***/
1281     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1282     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1283     STDMETHOD_(ULONG,Release)(THIS) PURE;
1284     /*** IDirect3DDevice7 methods ***/
1285     STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC7 lpD3DHELDevDesc) PURE;
1286     STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc, LPVOID lpArg) PURE;
1287     STDMETHOD(BeginScene)(THIS) PURE;
1288     STDMETHOD(EndScene)(THIS) PURE;
1289     STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D7 *lplpDirect3D3) PURE;
1290     STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 lpNewRenderTarget,DWORD dwFlags) PURE;
1291     STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 *lplpRenderTarget) PURE;
1292     STDMETHOD(Clear)(THIS_ DWORD dwCount,LPD3DRECT lpRects,DWORD dwFlags,D3DCOLOR dwColor,D3DVALUE dvZ,DWORD dwStencil) PURE;
1293     STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE;
1294     STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType, LPD3DMATRIX lpD3DMatrix) PURE;
1295     STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT7 lpData) PURE;
1296     STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE dtstTransformStateType,LPD3DMATRIX lpD3DMatrix) PURE;
1297     STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT7 lpData) PURE;
1298     STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL7 lpMat) PURE;
1299     STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL7 lpMat) PURE;
1300     STDMETHOD(SetLight)(THIS_ DWORD dwLightIndex,LPD3DLIGHT7 lpLight) PURE;
1301     STDMETHOD(GetLight)(THIS_ DWORD dwLightIndex,LPD3DLIGHT7 lpLight) PURE;
1302     STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, DWORD dwRenderState) PURE;
1303     STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE dwRenderStateType, LPDWORD lpdwRenderState) PURE;
1304     STDMETHOD(BeginStateBlock)(THIS) PURE;
1305     STDMETHOD(EndStateBlock)(THIS_ LPDWORD lpdwBlockHandle) PURE;
1306     STDMETHOD(PreLoad)(THIS_ LPDIRECTDRAWSURFACE7 lpddsTexture) PURE;
1307     STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, DWORD dwFlags) PURE;
1308     STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType, DWORD d3dvtVertexType, LPVOID lpvVertices, DWORD dwVertexCount, LPWORD dwIndices, DWORD dwIndexCount, DWORD dwFlags) PURE;
1309     STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE;
1310     STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS lpD3DClipStatus) PURE;
1311     STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,DWORD dwFlags) PURE;
1312     STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,DWORD dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,DWORD dwVertexCount,LPWORD lpIndex,DWORD dwIndexCount,DWORD dwFlags) PURE;
1313     STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,DWORD dwFlags) PURE;
1314     STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf,DWORD dwStartVertex,DWORD dwNumVertices,LPWORD lpwIndices,DWORD dwIndexCount,DWORD dwFlags) PURE;
1315     STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR lpCenters,LPD3DVALUE lpRadii,DWORD dwNumSpheres,DWORD dwFlags,LPDWORD lpdwReturnValues) PURE;
1316     STDMETHOD(GetTexture)(THIS_ DWORD dwStage,LPDIRECTDRAWSURFACE7 *lpTexture) PURE;
1317     STDMETHOD(SetTexture)(THIS_ DWORD dwStage,LPDIRECTDRAWSURFACE7 lpTexture) PURE;
1318     STDMETHOD(GetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,LPDWORD lpdwState) PURE;
1319     STDMETHOD(SetTextureStageState)(THIS_ DWORD dwStage,D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,DWORD dwState) PURE;
1320     STDMETHOD(ValidateDevice)(THIS_ LPDWORD lpdwPasses) PURE;
1321     STDMETHOD(ApplyStateBlock)(THIS_ DWORD dwBlockHandle) PURE;
1322     STDMETHOD(CaptureStateBlock)(THIS_ DWORD dwBlockHandle) PURE;
1323     STDMETHOD(DeleteStateBlock)(THIS_ DWORD dwBlockHandle) PURE;
1324     STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE d3dsbType,LPDWORD lpdwBlockHandle) PURE;
1325     STDMETHOD(Load)(THIS_ LPDIRECTDRAWSURFACE7 lpDestTex,LPPOINT lpDestPoint,LPDIRECTDRAWSURFACE7 lpSrcTex,LPRECT lprcSrcRect,DWORD dwFlags) PURE;
1326     STDMETHOD(LightEnable)(THIS_ DWORD dwLightIndex,BOOL bEnable) PURE;
1327     STDMETHOD(GetLightEnable)(THIS_ DWORD dwLightIndex,BOOL *pbEnable) PURE;
1328     STDMETHOD(SetClipPlane)(THIS_ DWORD dwIndex,D3DVALUE *pPlaneEquation) PURE;
1329     STDMETHOD(GetClipPlane)(THIS_ DWORD dwIndex,D3DVALUE *pPlaneEquation) PURE;
1330     STDMETHOD(GetInfo)(THIS_ DWORD dwDevInfoID,LPVOID pDevInfoStruct,DWORD dwSize) PURE;
1331 };
1332 #undef INTERFACE
1333
1334 #if !defined(__cplusplus) || defined(CINTERFACE)
1335 /*** IUnknown methods ***/
1336 #define IDirect3DDevice7_QueryInterface(p,a,b)                        (p)->lpVtbl->QueryInterface(p,a,b)
1337 #define IDirect3DDevice7_AddRef(p)                                    (p)->lpVtbl->AddRef(p)
1338 #define IDirect3DDevice7_Release(p)                                   (p)->lpVtbl->Release(p)
1339 /*** IDirect3DDevice7 methods ***/
1340 #define IDirect3DDevice7_GetCaps(p,a)                                 (p)->lpVtbl->GetCaps(p,a)
1341 #define IDirect3DDevice7_EnumTextureFormats(p,a,b)                    (p)->lpVtbl->EnumTextureFormats(p,a,b)
1342 #define IDirect3DDevice7_BeginScene(p)                                (p)->lpVtbl->BeginScene(p)
1343 #define IDirect3DDevice7_EndScene(p)                                  (p)->lpVtbl->EndScene(p)
1344 #define IDirect3DDevice7_GetDirect3D(p,a)                             (p)->lpVtbl->GetDirect3D(p,a)
1345 #define IDirect3DDevice7_SetRenderTarget(p,a,b)                       (p)->lpVtbl->SetRenderTarget(p,a,b)
1346 #define IDirect3DDevice7_GetRenderTarget(p,a)                         (p)->lpVtbl->GetRenderTarget(p,a)
1347 #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f)                         (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
1348 #define IDirect3DDevice7_SetTransform(p,a,b)                          (p)->lpVtbl->SetTransform(p,a,b)
1349 #define IDirect3DDevice7_GetTransform(p,a,b)                          (p)->lpVtbl->GetTransform(p,a,b)
1350 #define IDirect3DDevice7_SetViewport(p,a)                             (p)->lpVtbl->SetViewport(p,a)
1351 #define IDirect3DDevice7_MultiplyTransform(p,a,b)                     (p)->lpVtbl->MultiplyTransform(p,a,b)
1352 #define IDirect3DDevice7_GetViewport(p,a)                             (p)->lpVtbl->GetViewport(p,a)
1353 #define IDirect3DDevice7_SetMaterial(p,a)                             (p)->lpVtbl->SetMaterial(p,a)
1354 #define IDirect3DDevice7_GetMaterial(p,a)                             (p)->lpVtbl->GetMaterial(p,a)
1355 #define IDirect3DDevice7_SetLight(p,a,b)                              (p)->lpVtbl->SetLight(p,a,b)
1356 #define IDirect3DDevice7_GetLight(p,a,b)                              (p)->lpVtbl->GetLight(p,a,b)
1357 #define IDirect3DDevice7_SetRenderState(p,a,b)                        (p)->lpVtbl->SetRenderState(p,a,b)
1358 #define IDirect3DDevice7_GetRenderState(p,a,b)                        (p)->lpVtbl->GetRenderState(p,a,b)
1359 #define IDirect3DDevice7_BeginStateBlock(p)                           (p)->lpVtbl->BeginStateBlock(p)
1360 #define IDirect3DDevice7_EndStateBlock(p,a)                           (p)->lpVtbl->EndStateBlock(p,a)
1361 #define IDirect3DDevice7_PreLoad(p,a)                                 (p)->lpVtbl->PreLoad(p,a)
1362 #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e)                   (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
1363 #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g)        (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
1364 #define IDirect3DDevice7_SetClipStatus(p,a)                           (p)->lpVtbl->SetClipStatus(p,a)
1365 #define IDirect3DDevice7_GetClipStatus(p,a)                           (p)->lpVtbl->GetClipStatus(p,a)
1366 #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e)            (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
1367 #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
1368 #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e)                 (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
1369 #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g)      (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g)
1370 #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e)         (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
1371 #define IDirect3DDevice7_GetTexture(p,a,b)                            (p)->lpVtbl->GetTexture(p,a,b)
1372 #define IDirect3DDevice7_SetTexture(p,a,b)                            (p)->lpVtbl->SetTexture(p,a,b)
1373 #define IDirect3DDevice7_GetTextureStageState(p,a,b,c)                (p)->lpVtbl->GetTextureStageState(p,a,b,c)
1374 #define IDirect3DDevice7_SetTextureStageState(p,a,b,c)                (p)->lpVtbl->SetTextureStageState(p,a,b,c)
1375 #define IDirect3DDevice7_ValidateDevice(p,a)                          (p)->lpVtbl->ValidateDevice(p,a)
1376 #define IDirect3DDevice7_ApplyStateBlock(p,a)                         (p)->lpVtbl->ApplyStateBlock(p,a)
1377 #define IDirect3DDevice7_CaptureStateBlock(p,a)                       (p)->lpVtbl->CaptureStateBlock(p,a)
1378 #define IDirect3DDevice7_DeleteStateBlock(p,a)                        (p)->lpVtbl->DeleteStateBlock(p,a)
1379 #define IDirect3DDevice7_CreateStateBlock(p,a,b)                      (p)->lpVtbl->CreateStateBlock(p,a,b)
1380 #define IDirect3DDevice7_Load(p,a,b,c,d,e)                            (p)->lpVtbl->Load(p,a,b,c,d,e)
1381 #define IDirect3DDevice7_LightEnable(p,a,b)                           (p)->lpVtbl->LightEnable(p,a,b)
1382 #define IDirect3DDevice7_GetLightEnable(p,a,b)                        (p)->lpVtbl->GetLightEnable(p,a,b)
1383 #define IDirect3DDevice7_SetClipPlane(p,a,b)                          (p)->lpVtbl->SetClipPlane(p,a,b)
1384 #define IDirect3DDevice7_GetClipPlane(p,a,b)                          (p)->lpVtbl->GetClipPlane(p,a,b)
1385 #define IDirect3DDevice7_GetInfo(p,a,b,c)                             (p)->lpVtbl->GetInfo(p,a,b,c)
1386 #else
1387 /*** IUnknown methods ***/
1388 #define IDirect3DDevice7_QueryInterface(p,a,b)                        (p)->QueryInterface(a,b)
1389 #define IDirect3DDevice7_AddRef(p)                                    (p)->AddRef()
1390 #define IDirect3DDevice7_Release(p)                                   (p)->Release()
1391 /*** IDirect3DDevice7 methods ***/
1392 #define IDirect3DDevice7_GetCaps(p,a)                                 (p)->GetCaps(a)
1393 #define IDirect3DDevice7_EnumTextureFormats(p,a,b)                    (p)->EnumTextureFormats(a,b)
1394 #define IDirect3DDevice7_BeginScene(p)                                (p)->BeginScene()
1395 #define IDirect3DDevice7_EndScene(p)                                  (p)->EndScene()
1396 #define IDirect3DDevice7_GetDirect3D(p,a)                             (p)->GetDirect3D(a)
1397 #define IDirect3DDevice7_SetRenderTarget(p,a,b)                       (p)->SetRenderTarget(a,b)
1398 #define IDirect3DDevice7_GetRenderTarget(p,a)                         (p)->GetRenderTarget(a)
1399 #define IDirect3DDevice7_Clear(p,a,b,c,d,e,f)                         (p)->Clear(a,b,c,d,e,f)
1400 #define IDirect3DDevice7_SetTransform(p,a,b)                          (p)->SetTransform(a,b)
1401 #define IDirect3DDevice7_GetTransform(p,a,b)                          (p)->GetTransform(a,b)
1402 #define IDirect3DDevice7_SetViewport(p,a)                             (p)->SetViewport(a)
1403 #define IDirect3DDevice7_MultiplyTransform(p,a,b)                     (p)->MultiplyTransform(a,b)
1404 #define IDirect3DDevice7_GetViewport(p,a)                             (p)->GetViewport(a)
1405 #define IDirect3DDevice7_SetMaterial(p,a)                             (p)->SetMaterial(a)
1406 #define IDirect3DDevice7_GetMaterial(p,a)                             (p)->GetMaterial(a)
1407 #define IDirect3DDevice7_SetLight(p,a,b)                              (p)->SetLight(a,b)
1408 #define IDirect3DDevice7_GetLight(p,a,b)                              (p)->GetLight(a,b)
1409 #define IDirect3DDevice7_SetRenderState(p,a,b)                        (p)->SetRenderState(a,b)
1410 #define IDirect3DDevice7_GetRenderState(p,a,b)                        (p)->GetRenderState(a,b)
1411 #define IDirect3DDevice7_BeginStateBlock(p)                           (p)->BeginStateBlock()
1412 #define IDirect3DDevice7_EndStateBlock(p,a)                           (p)->EndStateBlock(a)
1413 #define IDirect3DDevice7_PreLoad(p,a)                                 (p)->PreLoad(a)
1414 #define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e)                   (p)->DrawPrimitive(a,b,c,d,e)
1415 #define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g)        (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
1416 #define IDirect3DDevice7_SetClipStatus(p,a)                           (p)->SetClipStatus(a)
1417 #define IDirect3DDevice7_GetClipStatus(p,a)                           (p)->GetClipStatus(a)
1418 #define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e)            (p)->DrawPrimitiveStrided(a,b,c,d,e)
1419 #define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
1420 #define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e)                 (p)->DrawPrimitiveVB(a,b,c,d,e)
1421 #define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g)      (p)->DrawIndexedPrimitiveVB(a,b,c,d,e,f,g)
1422 #define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e)         (p)->ComputeSphereVisibility(a,b,c,d,e)
1423 #define IDirect3DDevice7_GetTexture(p,a,b)                            (p)->GetTexture(a,b)
1424 #define IDirect3DDevice7_SetTexture(p,a,b)                            (p)->SetTexture(a,b)
1425 #define IDirect3DDevice7_GetTextureStageState(p,a,b,c)                (p)->GetTextureStageState(a,b,c)
1426 #define IDirect3DDevice7_SetTextureStageState(p,a,b,c)                (p)->SetTextureStageState(a,b,c)
1427 #define IDirect3DDevice7_ValidateDevice(p,a)                          (p)->ValidateDevice(a)
1428 #define IDirect3DDevice7_ApplyStateBlock(p,a)                         (p)->ApplyStateBlock(a)
1429 #define IDirect3DDevice7_CaptureStateBlock(p,a)                       (p)->CaptureStateBlock(a)
1430 #define IDirect3DDevice7_DeleteStateBlock(p,a)                        (p)->DeleteStateBlock(a)
1431 #define IDirect3DDevice7_CreateStateBlock(p,a,b)                      (p)->CreateStateBlock(a,b)
1432 #define IDirect3DDevice7_Load(p,a,b,c,d,e)                            (p)->Load(a,b,c,d,e)
1433 #define IDirect3DDevice7_LightEnable(p,a,b)                           (p)->LightEnable(a,b)
1434 #define IDirect3DDevice7_GetLightEnable(p,a,b)                        (p)->GetLightEnable(a,b)
1435 #define IDirect3DDevice7_SetClipPlane(p,a,b)                          (p)->SetClipPlane(a,b)
1436 #define IDirect3DDevice7_GetClipPlane(p,a,b)                          (p)->GetClipPlane(a,b)
1437 #define IDirect3DDevice7_GetInfo(p,a,b,c)                             (p)->GetInfo(a,b,c)
1438 #endif
1439
1440
1441
1442 /*****************************************************************************
1443  * IDirect3DVertexBuffer interface
1444  */
1445 #define INTERFACE IDirect3DVertexBuffer
1446 DECLARE_INTERFACE_(IDirect3DVertexBuffer,IUnknown)
1447 {
1448     /*** IUnknown methods ***/
1449     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1450     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1451     STDMETHOD_(ULONG,Release)(THIS) PURE;
1452     /*** IDirect3DVertexBuffer methods ***/
1453     STDMETHOD(Lock)(THIS_ DWORD dwFlags,LPVOID *lplpData,LPDWORD lpdwSize) PURE;
1454     STDMETHOD(Unlock)(THIS) PURE;
1455     STDMETHOD(ProcessVertices)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPDIRECT3DVERTEXBUFFER lpSrcBuffer,DWORD dwSrcIndex,LPDIRECT3DDEVICE3 lpD3DDevice,DWORD dwFlags) PURE;
1456     STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertexBufferDesc) PURE;
1457     STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE3  lpD3DDevice,DWORD dwFlags) PURE;
1458 };
1459 #undef INTERFACE
1460
1461 #if !defined(__cplusplus) || defined(CINTERFACE)
1462 /*** IUnknown methods ***/
1463 #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1464 #define IDirect3DVertexBuffer_AddRef(p)             (p)->lpVtbl->AddRef(p)
1465 #define IDirect3DVertexBuffer_Release(p)            (p)->lpVtbl->Release(p)
1466 /*** IDirect3DVertexBuffer methods ***/
1467 #define IDirect3DVertexBuffer_Lock(p,a,b,c)                    (p)->lpVtbl->Lock(p,a,b,c)
1468 #define IDirect3DVertexBuffer_Unlock(p)                        (p)->lpVtbl->Unlock(p)
1469 #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
1470 #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a)         (p)->lpVtbl->GetVertexBufferDesc(p,a)
1471 #define IDirect3DVertexBuffer_Optimize(p,a,b)                  (p)->lpVtbl->Optimize(p,a,b)
1472 #else
1473 /*** IUnknown methods ***/
1474 #define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1475 #define IDirect3DVertexBuffer_AddRef(p)             (p)->AddRef()
1476 #define IDirect3DVertexBuffer_Release(p)            (p)->Release()
1477 /*** IDirect3DVertexBuffer methods ***/
1478 #define IDirect3DVertexBuffer_Lock(p,a,b,c)                    (p)->Lock(a,b,c)
1479 #define IDirect3DVertexBuffer_Unlock(p)                        (p)->Unlock()
1480 #define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
1481 #define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a)         (p)->GetVertexBufferDesc(a)
1482 #define IDirect3DVertexBuffer_Optimize(p,a,b)                  (p)->Optimize(a,b)
1483 #endif
1484
1485 /*****************************************************************************
1486  * IDirect3DVertexBuffer7 interface
1487  */
1488 #define INTERFACE IDirect3DVertexBuffer7
1489 DECLARE_INTERFACE_(IDirect3DVertexBuffer7,IUnknown)
1490 {
1491     /*** IUnknown methods ***/
1492     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1493     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1494     STDMETHOD_(ULONG,Release)(THIS) PURE;
1495     /*** IDirect3DVertexBuffer7 methods ***/
1496     STDMETHOD(Lock)(THIS_ DWORD dwFlags,LPVOID *lplpData,LPDWORD lpdwSize) PURE;
1497     STDMETHOD(Unlock)(THIS) PURE;
1498     STDMETHOD(ProcessVertices)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPDIRECT3DVERTEXBUFFER7 lpSrcBuffer,DWORD dwSrcIndex,LPDIRECT3DDEVICE7 lpD3DDevice,DWORD dwFlags) PURE;
1499     STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC lpD3DVertexBufferDesc) PURE;
1500     STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE7  lpD3DDevice,DWORD dwFlags) PURE;
1501     STDMETHOD(ProcessVerticesStrided)(THIS_ DWORD dwVertexOp,DWORD dwDestIndex,DWORD dwCount,LPD3DDRAWPRIMITIVESTRIDEDDATA lpStrideData,DWORD dwVertexTypeDesc,LPDIRECT3DDEVICE7 lpD3DDevice,DWORD dwFlags) PURE;
1502 };
1503 #undef INTERFACE
1504
1505 #if !defined(__cplusplus) || defined(CINTERFACE)
1506 /*** IUnknown methods ***/
1507 #define IDirect3DVertexBuffer7_QueryInterface(p,a,b)                   (p)->lpVtbl->QueryInterface(p,a,b)
1508 #define IDirect3DVertexBuffer7_AddRef(p)                               (p)->lpVtbl->AddRef(p)
1509 #define IDirect3DVertexBuffer7_Release(p)                              (p)->lpVtbl->Release(p)
1510 /*** IDirect3DVertexBuffer7 methods ***/
1511 #define IDirect3DVertexBuffer7_Lock(p,a,b,c)                           (p)->lpVtbl->Lock(p,a,b,c)
1512 #define IDirect3DVertexBuffer7_Unlock(p)                               (p)->lpVtbl->Unlock(p)
1513 #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g)        (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
1514 #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a)                (p)->lpVtbl->GetVertexBufferDesc(p,a)
1515 #define IDirect3DVertexBuffer7_Optimize(p,a,b)                         (p)->lpVtbl->Optimize(p,a,b)
1516 #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVerticesStrided(p,a,b,c,d,e,f,g)
1517 #else
1518 /*** IUnknown methods ***/
1519 #define IDirect3DVertexBuffer7_QueryInterface(p,a,b)                   (p)->QueryInterface(a,b)
1520 #define IDirect3DVertexBuffer7_AddRef(p)                               (p)->AddRef()
1521 #define IDirect3DVertexBuffer7_Release(p)                              (p)->Release()
1522 /*** IDirect3DVertexBuffer7 methods ***/
1523 #define IDirect3DVertexBuffer7_Lock(p,a,b,c)                           (p)->Lock(a,b,c)
1524 #define IDirect3DVertexBuffer7_Unlock(p)                               (p)->Unlock()
1525 #define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g)        (p)->ProcessVertices(a,b,c,d,e,f,g)
1526 #define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a)                (p)->GetVertexBufferDesc(a)
1527 #define IDirect3DVertexBuffer7_Optimize(p,a,b)                         (p)->Optimize(a,b)
1528 #define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->ProcessVerticesStrided(a,b,c,d,e,f,g)
1529 #endif
1530
1531 #endif /* __WINE_D3D_H */