/[cvs]/api/include/d3d.h
ViewVC logotype

Annotation of /api/include/d3d.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (23 years, 4 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

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

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26