source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/d3dx9core.h@ 1170

Last change on this file since 1170 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 23.6 KB
Line 
1#include <_mingw_unicode.h>
2#undef INTERFACE
3/*
4 * Copyright (C) 2007, 2008 Tony Wasserka
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "d3dx9.h"
22
23#ifndef __WINE_D3DX9CORE_H
24#define __WINE_D3DX9CORE_H
25
26/**********************************************
27 ***************** Definitions ****************
28 **********************************************/
29#define D3DX_VERSION 0x0902
30#ifndef D3DX_SDK_VERSION
31#define D3DX_SDK_VERSION 43
32#endif
33#define D3DXSPRITE_DONOTSAVESTATE 0x00000001
34#define D3DXSPRITE_DONOTMODIFY_RENDERSTATE 0x00000002
35#define D3DXSPRITE_OBJECTSPACE 0x00000004
36#define D3DXSPRITE_BILLBOARD 0x00000008
37#define D3DXSPRITE_ALPHABLEND 0x00000010
38#define D3DXSPRITE_SORT_TEXTURE 0x00000020
39#define D3DXSPRITE_SORT_DEPTH_FRONTTOBACK 0x00000040
40#define D3DXSPRITE_SORT_DEPTH_BACKTOFRONT 0x00000080
41#define D3DXSPRITE_DO_NOT_ADDREF_TEXTURE 0x00000100
42
43/**********************************************
44 ******************** GUIDs *******************
45 **********************************************/
46DEFINE_GUID(IID_ID3DXBuffer, 0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2);
47DEFINE_GUID(IID_ID3DXFont, 0xd79dbb70, 0x5f21, 0x4d36, 0xbb, 0xc2, 0xff, 0x52, 0x5c, 0x21, 0x3c, 0xdc);
48DEFINE_GUID(IID_ID3DXLine, 0xd379ba7f, 0x9042, 0x4ac4, 0x9f, 0x5e, 0x58, 0x19, 0x2a, 0x4c, 0x6b, 0xd8);
49DEFINE_GUID(IID_ID3DXRenderToEnvMap, 0x313f1b4b, 0xc7b0, 0x4fa2, 0x9d, 0x9d, 0x8d, 0x38, 0xb, 0x64, 0x38, 0x5e);
50DEFINE_GUID(IID_ID3DXRenderToSurface, 0x6985f346, 0x2c3d, 0x43b3, 0xbe, 0x8b, 0xda, 0xae, 0x8a, 0x3, 0xd8, 0x94);
51DEFINE_GUID(IID_ID3DXSprite, 0xba0b762d, 0x7d28, 0x43ec, 0xb9, 0xdc, 0x2f, 0x84, 0x44, 0x3b, 0x6, 0x14);
52
53/**********************************************
54 ****************** typedefs ******************
55 **********************************************/
56typedef struct ID3DXBuffer *LPD3DXBUFFER;
57typedef struct ID3DXFont *LPD3DXFONT;
58typedef struct ID3DXLine *LPD3DXLINE;
59typedef struct ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap;
60typedef struct ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE;
61typedef struct ID3DXSprite *LPD3DXSPRITE;
62
63/**********************************************
64 *********** interface declarations ***********
65 **********************************************/
66#define INTERFACE ID3DXBuffer
67DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
68{
69 /*** IUnknown methods ***/
70 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
71 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
72 STDMETHOD_(ULONG, Release)(THIS) PURE;
73 /*** ID3DXBuffer methods ***/
74 STDMETHOD_(void *, GetBufferPointer)(THIS) PURE;
75 STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
76};
77#undef INTERFACE
78
79#if !defined(__cplusplus) || defined(CINTERFACE)
80/*** IUnknown methods ***/
81#define ID3DXBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
82#define ID3DXBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
83#define ID3DXBuffer_Release(p) (p)->lpVtbl->Release(p)
84/*** ID3DXBuffer methods ***/
85#define ID3DXBuffer_GetBufferPointer(p) (p)->lpVtbl->GetBufferPointer(p)
86#define ID3DXBuffer_GetBufferSize(p) (p)->lpVtbl->GetBufferSize(p)
87#else
88/*** IUnknown methods ***/
89#define ID3DXBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
90#define ID3DXBuffer_AddRef(p) (p)->AddRef()
91#define ID3DXBuffer_Release(p) (p)->Release()
92/*** ID3DXBuffer methods ***/
93#define ID3DXBuffer_GetBufferPointer(p) (p)->GetBufferPointer()
94#define ID3DXBuffer_GetBufferSize(p) (p)->GetBufferSize()
95#endif
96
97typedef struct _D3DXFONT_DESCA
98{
99 INT Height;
100 UINT Width;
101 UINT Weight;
102 UINT MipLevels;
103 WINBOOL Italic;
104 BYTE CharSet;
105 BYTE OutputPrecision;
106 BYTE Quality;
107 BYTE PitchAndFamily;
108 CHAR FaceName[LF_FACESIZE];
109} D3DXFONT_DESCA, *LPD3DXFONT_DESCA;
110
111typedef struct _D3DXFONT_DESCW
112{
113 INT Height;
114 UINT Width;
115 UINT Weight;
116 UINT MipLevels;
117 WINBOOL Italic;
118 BYTE CharSet;
119 BYTE OutputPrecision;
120 BYTE Quality;
121 BYTE PitchAndFamily;
122 WCHAR FaceName[LF_FACESIZE];
123} D3DXFONT_DESCW, *LPD3DXFONT_DESCW;
124
125__MINGW_TYPEDEF_AW(D3DXFONT_DESC)
126__MINGW_TYPEDEF_AW(LPD3DXFONT_DESC)
127
128#define INTERFACE ID3DXFont
129DECLARE_INTERFACE_(ID3DXFont, IUnknown)
130{
131 /*** IUnknown methods ***/
132 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
133 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
134 STDMETHOD_(ULONG, Release)(THIS) PURE;
135 /*** ID3DXFont methods ***/
136 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
137 STDMETHOD(GetDescA)(THIS_ D3DXFONT_DESCA *desc) PURE;
138 STDMETHOD(GetDescW)(THIS_ D3DXFONT_DESCW *desc) PURE;
139 STDMETHOD_(WINBOOL, GetTextMetricsA)(THIS_ TEXTMETRICA *metrics) PURE;
140 STDMETHOD_(WINBOOL, GetTextMetricsW)(THIS_ TEXTMETRICW *metrics) PURE;
141
142 STDMETHOD_(HDC, GetDC)(THIS) PURE;
143 STDMETHOD(GetGlyphData)(THIS_ UINT glyph, struct IDirect3DTexture9 **texture,
144 RECT *blackbox, POINT *cellinc) PURE;
145
146 STDMETHOD(PreloadCharacters)(THIS_ UINT first, UINT last) PURE;
147 STDMETHOD(PreloadGlyphs)(THIS_ UINT first, UINT last) PURE;
148 STDMETHOD(PreloadTextA)(THIS_ const char *string, INT count) PURE;
149 STDMETHOD(PreloadTextW)(THIS_ const WCHAR *string, INT count) PURE;
150
151 STDMETHOD_(INT, DrawTextA)(THIS_ struct ID3DXSprite *sprite, const char *string,
152 INT count, RECT *rect, DWORD format, D3DCOLOR color) PURE;
153 STDMETHOD_(INT, DrawTextW)(THIS_ struct ID3DXSprite *sprite, const WCHAR *string,
154 INT count, RECT *rect, DWORD format, D3DCOLOR color) PURE;
155
156 STDMETHOD(OnLostDevice)(THIS) PURE;
157 STDMETHOD(OnResetDevice)(THIS) PURE;
158};
159#undef INTERFACE
160
161#if !defined(__cplusplus) || defined(CINTERFACE)
162
163/*** IUnknown methods ***/
164#define ID3DXFont_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
165#define ID3DXFont_AddRef(p) (p)->lpVtbl->AddRef(p)
166#define ID3DXFont_Release(p) (p)->lpVtbl->Release(p)
167/*** ID3DXFont methods ***/
168#define ID3DXFont_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
169#define ID3DXFont_GetDescA(p,a) (p)->lpVtbl->GetDescA(p,a)
170#define ID3DXFont_GetDescW(p,a) (p)->lpVtbl->GetDescW(p,a)
171#define ID3DXFont_GetTextMetricsA(p,a) (p)->lpVtbl->GetTextMetricsA(p,a)
172#define ID3DXFont_GetTextMetricsW(p,a) (p)->lpVtbl->GetTextMetricsW(p,a)
173#define ID3DXFont_GetDC(p) (p)->lpVtbl->GetDC(p)
174#define ID3DXFont_GetGlyphData(p,a,b,c,d) (p)->lpVtbl->GetGlyphData(p,a,b,c,d)
175#define ID3DXFont_PreloadCharacters(p,a,b) (p)->lpVtbl->PreloadCharacters(p,a,b)
176#define ID3DXFont_PreloadGlyphs(p,a,b) (p)->lpVtbl->PreloadGlyphs(p,a,b)
177#define ID3DXFont_PreloadTextA(p,a,b) (p)->lpVtbl->PreloadTextA(p,a,b)
178#define ID3DXFont_PreloadTextW(p,a,b) (p)->lpVtbl->PreloadTextW(p,a,b)
179#define ID3DXFont_DrawTextA(p,a,b,c,d,e,f) (p)->lpVtbl->DrawTextA(p,a,b,c,d,e,f)
180#define ID3DXFont_DrawTextW(p,a,b,c,d,e,f) (p)->lpVtbl->DrawTextW(p,a,b,c,d,e,f)
181#define ID3DXFont_OnLostDevice(p) (p)->lpVtbl->OnLostDevice(p)
182#define ID3DXFont_OnResetDevice(p) (p)->lpVtbl->OnResetDevice(p)
183#else
184/*** IUnknown methods ***/
185#define ID3DXFont_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
186#define ID3DXFont_AddRef(p) (p)->AddRef()
187#define ID3DXFont_Release(p) (p)->Release()
188/*** ID3DXFont methods ***/
189#define ID3DXFont_GetDevice(p,a) (p)->GetDevice(a)
190#define ID3DXFont_GetDescA(p,a) (p)->GetDescA(a)
191#define ID3DXFont_GetDescW(p,a) (p)->GetDescW(a)
192#define ID3DXFont_GetTextMetricsA(p,a) (p)->GetTextMetricsA(a)
193#define ID3DXFont_GetTextMetricsW(p,a) (p)->GetTextMetricsW(a)
194#define ID3DXFont_GetDC(p) (p)->GetDC()
195#define ID3DXFont_GetGlyphData(p,a,b,c,d) (p)->GetGlyphData(a,b,c,d)
196#define ID3DXFont_PreloadCharacters(p,a,b) (p)->PreloadCharacters(a,b)
197#define ID3DXFont_PreloadGlyphs(p,a,b) (p)->PreloadGlyphs(a,b)
198#define ID3DXFont_PreloadTextA(p,a,b) (p)->PreloadTextA(a,b)
199#define ID3DXFont_PreloadTextW(p,a,b) (p)->PreloadTextW(a,b)
200#define ID3DXFont_DrawTextA(p,a,b,c,d,e,f) (p)->DrawTextA(a,b,c,d,e,f)
201#define ID3DXFont_DrawTextW(p,a,b,c,d,e,f) (p)->DrawTextW(a,b,c,d,e,f)
202#define ID3DXFont_OnLostDevice(p) (p)->OnLostDevice()
203#define ID3DXFont_OnResetDevice(p) (p)->OnResetDevice()
204#endif
205#define ID3DXFont_DrawText __MINGW_NAME_AW(ID3DXFont_DrawText)
206#define ID3DXFont_GetDesc __MINGW_NAME_AW(ID3DXFont_GetDesc)
207#define ID3DXFont_GetTextMetrics __MINGW_NAME_AW(ID3DXFont_GetTextMetrics)
208#define ID3DXFont_PreloadText __MINGW_NAME_AW(ID3DXFont_PreloadText)
209
210#define INTERFACE ID3DXLine
211DECLARE_INTERFACE_(ID3DXLine, IUnknown)
212{
213 /*** IUnknown methods ***/
214 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
215 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
216 STDMETHOD_(ULONG, Release)(THIS) PURE;
217
218 /*** ID3DXLine methods ***/
219 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
220
221 STDMETHOD(Begin)(THIS) PURE;
222 STDMETHOD(Draw)(THIS_ const D3DXVECTOR2 *vertexlist, DWORD vertexlistcount, D3DCOLOR color) PURE;
223 STDMETHOD(DrawTransform)(THIS_ const D3DXVECTOR3 *vertexlist, DWORD vertexlistcount,
224 const D3DXMATRIX *transform, D3DCOLOR color) PURE;
225 STDMETHOD(SetPattern)(THIS_ DWORD pattern) PURE;
226 STDMETHOD_(DWORD, GetPattern)(THIS) PURE;
227 STDMETHOD(SetPatternScale)(THIS_ FLOAT scale) PURE;
228 STDMETHOD_(FLOAT, GetPatternScale)(THIS) PURE;
229 STDMETHOD(SetWidth)(THIS_ FLOAT width) PURE;
230 STDMETHOD_(FLOAT, GetWidth)(THIS) PURE;
231 STDMETHOD(SetAntialias)(THIS_ WINBOOL antialias) PURE;
232 STDMETHOD_(WINBOOL, GetAntialias)(THIS) PURE;
233 STDMETHOD(SetGLLines)(THIS_ WINBOOL gl_lines) PURE;
234 STDMETHOD_(WINBOOL, GetGLLines)(THIS) PURE;
235 STDMETHOD(End)(THIS) PURE;
236
237 STDMETHOD(OnLostDevice)(THIS) PURE;
238 STDMETHOD(OnResetDevice)(THIS) PURE;
239};
240#undef INTERFACE
241
242#if !defined(__cplusplus) || defined(CINTERFACE)
243/*** IUnknown methods ***/
244#define ID3DXLine_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
245#define ID3DXLine_AddRef(p) (p)->lpVtbl->AddRef(p)
246#define ID3DXLine_Release(p) (p)->lpVtbl->Release(p)
247/*** ID3DXLine methods ***/
248#define ID3DXLine_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
249#define ID3DXLine_Begin(p) (p)->lpVtbl->Begin(p)
250#define ID3DXLine_Draw(p,a,b,c) (p)->lpVtbl->Draw(p,a,b,c)
251#define ID3DXLine_DrawTransform(p,a,b,c,d) (p)->lpVtbl->DrawTransform(p,a,b,c,d)
252#define ID3DXLine_SetPattern(p,a) (p)->lpVtbl->SetPattern(p,a)
253#define ID3DXLine_GetPattern(p) (p)->lpVtbl->GetPattern(p)
254#define ID3DXLine_SetPatternScale(p,a) (p)->lpVtbl->SetPatternScale(p,a)
255#define ID3DXLine_GetPatternScale(p) (p)->lpVtbl->GetPatternScale(p)
256#define ID3DXLine_SetWidth(p,a) (p)->lpVtbl->SetWidth(p,a)
257#define ID3DXLine_GetWidth(p) (p)->lpVtbl->GetWidth(p)
258#define ID3DXLine_SetAntialias(p,a) (p)->lpVtbl->SetAntialias(p,a)
259#define ID3DXLine_GetAntialias(p) (p)->lpVtbl->GetAntialias(p)
260#define ID3DXLine_SetGLLines(p,a) (p)->lpVtbl->SetGLLines(p,a)
261#define ID3DXLine_GetGLLines(p) (p)->lpVtbl->GetGLLines(p)
262#define ID3DXLine_End(p) (p)->lpVtbl->End(p)
263#define ID3DXLine_OnLostDevice(p) (p)->lpVtbl->OnLostDevice(p)
264#define ID3DXLine_OnResetDevice(p) (p)->lpVtbl->OnResetDevice(p)
265#else
266/*** IUnknown methods ***/
267#define ID3DXLine_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
268#define ID3DXLine_AddRef(p) (p)->AddRef()
269#define ID3DXLine_Release(p) (p)->Release()
270/*** ID3DXLine methods ***/
271#define ID3DXLine_GetDevice(p,a) (p)->GetDevice(a)
272#define ID3DXLine_Begin(p) (p)->Begin()
273#define ID3DXLine_Draw(p,a,b,c) (p)->Draw(a,b,c)
274#define ID3DXLine_DrawTransform(p,a,b,c,d) (p)->DrawTransform(a,b,c,d)
275#define ID3DXLine_SetPattern(p,a) (p)->SetPattern(a)
276#define ID3DXLine_GetPattern(p) (p)->GetPattern()
277#define ID3DXLine_SetPatternScale(p,a) (p)->SetPatternScale(a)
278#define ID3DXLine_GetPatternScale(p) (p)->GetPatternScale()
279#define ID3DXLine_SetWidth(p,a) (p)->SetWidth(a)
280#define ID3DXLine_GetWidth(p) (p)->GetWidth()
281#define ID3DXLine_SetAntialias(p,a) (p)->SetAntialias(a)
282#define ID3DXLine_GetAntialias(p) (p)->GetAntialias()
283#define ID3DXLine_SetGLLines(p,a) (p)->SetGLLines(a)
284#define ID3DXLine_GetGLLines(p) (p)->GetGLLines()
285#define ID3DXLine_End(p) (p)->End()
286#define ID3DXLine_OnLostDevice(p) (p)->OnLostDevice()
287#define ID3DXLine_OnResetDevice(p) (p)->OnResetDevice()
288#endif
289
290typedef struct _D3DXRTE_DESC
291{
292 UINT Size;
293 UINT MipLevels;
294 D3DFORMAT Format;
295 WINBOOL DepthStencil;
296 D3DFORMAT DepthStencilFormat;
297} D3DXRTE_DESC;
298
299#define INTERFACE ID3DXRenderToEnvMap
300DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown)
301{
302 /*** IUnknown methods ***/
303 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
304 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
305 STDMETHOD_(ULONG, Release)(THIS) PURE;
306
307 /*** ID3DXRenderToEnvMap methods ***/
308 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
309 STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC *desc) PURE;
310
311 STDMETHOD(BeginCube)(THIS_ struct IDirect3DCubeTexture9 *cubetex) PURE;
312 STDMETHOD(BeginSphere)(THIS_ struct IDirect3DTexture9 *tex) PURE;
313 STDMETHOD(BeginHemisphere)(THIS_ struct IDirect3DTexture9 *texzpos, struct IDirect3DTexture9 *texzneg) PURE;
314 STDMETHOD(BeginParabolic)(THIS_ struct IDirect3DTexture9 *texzpos, struct IDirect3DTexture9 *texzneg) PURE;
315
316 STDMETHOD(Face)(THIS_ D3DCUBEMAP_FACES face, DWORD mipfilter) PURE;
317 STDMETHOD(End)(THIS_ DWORD mipfilter) PURE;
318
319 STDMETHOD(OnLostDevice)(THIS) PURE;
320 STDMETHOD(OnResetDevice)(THIS) PURE;
321};
322#undef INTERFACE
323
324#if !defined(__cplusplus) || defined(CINTERFACE)
325/*** IUnknown methods ***/
326#define ID3DXRenderToEnvMap_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
327#define ID3DXRenderToEnvMap_AddRef(p) (p)->lpVtbl->AddRef(p)
328#define ID3DXRenderToEnvMap_Release(p) (p)->lpVtbl->Release(p)
329/*** ID3DXRenderToEnvMap methods ***/
330#define ID3DXRenderToEnvMap_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
331#define ID3DXRenderToEnvMap_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
332#define ID3DXRenderToEnvMap_BeginCube(p,a) (p)->lpVtbl->BeginCube(p,a)
333#define ID3DXRenderToEnvMap_BeginSphere(p,a) (p)->lpVtbl->BeginSphere(p,a)
334#define ID3DXRenderToEnvMap_BeginHemisphere(p,a,b) (p)->lpVtbl->BeginHemisphere(p,a,b)
335#define ID3DXRenderToEnvMap_BeginParabolic(p,a,b) (p)->lpVtbl->BeginParabolic(p,a,b)
336#define ID3DXRenderToEnvMap_Face(p,a,b) (p)->lpVtbl->Face(p,a,b)
337#define ID3DXRenderToEnvMap_End(p,a) (p)->lpVtbl->End(p,a)
338#define ID3DXRenderToEnvMap_OnLostDevice(p) (p)->lpVtbl->OnLostDevice(p)
339#define ID3DXRenderToEnvMap_OnLostDevice(p) (p)->lpVtbl->OnLostDevice(p)
340#else
341/*** IUnknown methods ***/
342#define ID3DXRenderToEnvMap_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
343#define ID3DXRenderToEnvMap_AddRef(p) (p)->AddRef()
344#define ID3DXRenderToEnvMap_Release(p) (p)->Release()
345/*** ID3DXRenderToEnvMap methods ***/
346#define ID3DXRenderToEnvMap_GetDevice(p,a) (p)->GetDevice(a)
347#define ID3DXRenderToEnvMap_GetDesc(p,a) (p)->GetDesc(a)
348#define ID3DXRenderToEnvMap_BeginCube(p,a) (p)->BeginCube(a)
349#define ID3DXRenderToEnvMap_BeginSphere(p,a) (p)->BeginSphere(a)
350#define ID3DXRenderToEnvMap_BeginHemisphere(p,a,b) (p)->BeginHemisphere(a,b)
351#define ID3DXRenderToEnvMap_BeginParabolic(p,a,b) (p)->BeginParabolic(a,b)
352#define ID3DXRenderToEnvMap_Face(p,a,b) (p)->Face(a,b)
353#define ID3DXRenderToEnvMap_End(p,a) (p)->End(a)
354#define ID3DXRenderToEnvMap_OnLostDevice(p) (p)->OnLostDevice()
355#define ID3DXRenderToEnvMap_OnLostDevice(p) (p)->OnLostDevice()
356#endif
357
358typedef struct _D3DXRTS_DESC
359{
360 UINT Width;
361 UINT Height;
362 D3DFORMAT Format;
363 WINBOOL DepthStencil;
364 D3DFORMAT DepthStencilFormat;
365} D3DXRTS_DESC;
366
367#define INTERFACE ID3DXRenderToSurface
368DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown)
369{
370 /*** IUnknown methods ***/
371 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
372 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
373 STDMETHOD_(ULONG, Release)(THIS) PURE;
374 /*** ID3DXRenderToSurface methods ***/
375 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
376 STDMETHOD(GetDesc)(THIS_ D3DXRTS_DESC *desc) PURE;
377
378 STDMETHOD(BeginScene)(THIS_ struct IDirect3DSurface9 *surface, const D3DVIEWPORT9 *viewport) PURE;
379 STDMETHOD(EndScene)(THIS_ DWORD mipfilter) PURE;
380
381 STDMETHOD(OnLostDevice)(THIS) PURE;
382 STDMETHOD(OnResetDevice)(THIS) PURE;
383};
384#undef INTERFACE
385
386#if !defined(__cplusplus) || defined(CINTERFACE)
387/*** IUnknown methods ***/
388#define ID3DXRenderToSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
389#define ID3DXRenderToSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
390#define ID3DXRenderToSurface_Release(p) (p)->lpVtbl->Release(p)
391/*** ID3DXRenderToSurface methods ***/
392#define ID3DXRenderToSurface_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
393#define ID3DXRenderToSurface_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
394#define ID3DXRenderToSurface_BeginScene(p,a,b) (p)->lpVtbl->BeginScene(p,a,b)
395#define ID3DXRenderToSurface_EndScene(p,a) (p)->lpVtbl->EndScene(p,a)
396#define ID3DXRenderToSurface_OnLostDevice(p) (p)->lpVtbl->OnLostDevice(p)
397#define ID3DXRenderToSurface_OnResetDevice(p) (p)->lpVtbl->OnResetDevice(p)
398#else
399/*** IUnknown methods ***/
400#define ID3DXRenderToSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
401#define ID3DXRenderToSurface_AddRef(p) (p)->AddRef()
402#define ID3DXRenderToSurface_Release(p) (p)->Release()
403/*** ID3DXRenderToSurface methods ***/
404#define ID3DXRenderToSurface_GetDevice(p,a) (p)->GetDevice(a)
405#define ID3DXRenderToSurface_GetDesc(p,a) (p)->GetDesc(a)
406#define ID3DXRenderToSurface_BeginScene(p,a,b) (p)->BeginScene(a,b)
407#define ID3DXRenderToSurface_EndScene(p,a) (p)->EndScene(a)
408#define ID3DXRenderToSurface_OnLostDevice(p) (p)->OnLostDevice()
409#define ID3DXRenderToSurface_OnResetDevice(p) (p)->OnResetDevice()
410#endif
411
412#define INTERFACE ID3DXSprite
413DECLARE_INTERFACE_(ID3DXSprite, IUnknown)
414{
415 /*** IUnknown methods ***/
416 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **object) PURE;
417 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
418 STDMETHOD_(ULONG, Release)(THIS) PURE;
419 /*** ID3DXSprite methods ***/
420 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
421
422 STDMETHOD(GetTransform)(THIS_ D3DXMATRIX *transform) PURE;
423 STDMETHOD(SetTransform)(THIS_ const D3DXMATRIX *transform) PURE;
424 STDMETHOD(SetWorldViewRH)(THIS_ const D3DXMATRIX *world, const D3DXMATRIX *view) PURE;
425 STDMETHOD(SetWorldViewLH)(THIS_ const D3DXMATRIX *world, const D3DXMATRIX *view) PURE;
426
427 STDMETHOD(Begin)(THIS_ DWORD flags) PURE;
428 STDMETHOD(Draw)(THIS_ struct IDirect3DTexture9 *texture, const RECT *rect,
429 const D3DXVECTOR3 *center, const D3DXVECTOR3 *position, D3DCOLOR color) PURE;
430 STDMETHOD(Flush)(THIS) PURE;
431 STDMETHOD(End)(THIS) PURE;
432
433 STDMETHOD(OnLostDevice)(THIS) PURE;
434 STDMETHOD(OnResetDevice)(THIS) PURE;
435};
436#undef INTERFACE
437
438#if !defined(__cplusplus) || defined(CINTERFACE)
439/*** IUnknown methods ***/
440#define ID3DXSprite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
441#define ID3DXSprite_AddRef(p) (p)->lpVtbl->AddRef(p)
442#define ID3DXSprite_Release(p) (p)->lpVtbl->Release(p)
443/*** ID3DXSprite methods ***/
444#define ID3DXSprite_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
445#define ID3DXSprite_GetTransform(p,a) (p)->lpVtbl->GetTransform(p,a)
446#define ID3DXSprite_SetTransform(p,a) (p)->lpVtbl->SetTransform(p,a)
447#define ID3DXSprite_SetWorldViewRH(p,a,b) (p)->lpVtbl->SetWorldViewRH(p,a,b)
448#define ID3DXSprite_SetWorldViewLH(p,a,b) (p)->lpVtbl->SetWorldViewLH(p,a,b)
449#define ID3DXSprite_Begin(p,a) (p)->lpVtbl->Begin(p,a)
450#define ID3DXSprite_Draw(p,a,b,c,d,e) (p)->lpVtbl->Draw(p,a,b,c,d,e)
451#define ID3DXSprite_Flush(p) (p)->lpVtbl->Flush(p)
452#define ID3DXSprite_End(p) (p)->lpVtbl->End(p)
453#define ID3DXSprite_OnLostDevice(p) (p)->lpVtbl->OnLostDevice(p)
454#define ID3DXSprite_OnResetDevice(p) (p)->lpVtbl->OnResetDevice(p)
455#else
456/*** IUnknown methods ***/
457#define ID3DXSprite_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
458#define ID3DXSprite_AddRef(p) (p)->AddRef()
459#define ID3DXSprite_Release(p) (p)->Release()
460/*** ID3DXSprite methods ***/
461#define ID3DXSprite_GetDevice(p,a) (p)->GetDevice(a)
462#define ID3DXSprite_GetTransform(p,a) (p)->GetTransform(a)
463#define ID3DXSprite_SetTransform(p,a) (p)->SetTransform(a)
464#define ID3DXSprite_SetWorldViewRH(p,a,b) (p)->SetWorldViewRH(a,b)
465#define ID3DXSprite_SetWorldViewLH(p,a,b) (p)->SetWorldViewLH(a,b)
466#define ID3DXSprite_Begin(p,a) (p)->Begin(a)
467#define ID3DXSprite_Draw(p,a,b,c,d,e) (p)->Draw(a,b,c,d,e)
468#define ID3DXSprite_Flush(p) (p)->Flush()
469#define ID3DXSprite_End(p) (p)->End()
470#define ID3DXSprite_OnLostDevice(p) (p)->OnLostDevice()
471#define ID3DXSprite_OnResetDevice(p) (p)->OnResetDevice()
472#endif
473
474/**********************************************
475 ****************** functions *****************
476 **********************************************/
477#ifdef __cplusplus
478extern "C" {
479#endif
480
481WINBOOL WINAPI D3DXCheckVersion(UINT d3dsdkvers, UINT d3dxsdkvers);
482HRESULT WINAPI D3DXCreateFontA(struct IDirect3DDevice9 *device, INT height, UINT width, UINT weight,
483 UINT miplevels, WINBOOL italic, DWORD charset, DWORD precision, DWORD quality, DWORD pitchandfamily,
484 const char *facename, struct ID3DXFont **font);
485HRESULT WINAPI D3DXCreateFontW(struct IDirect3DDevice9 *device, INT height, UINT width, UINT weight,
486 UINT miplevels, WINBOOL italic, DWORD charset, DWORD precision, DWORD quality, DWORD pitchandfamily,
487 const WCHAR *facename, struct ID3DXFont **font);
488#define D3DXCreateFont __MINGW_NAME_AW(D3DXCreateFont)
489HRESULT WINAPI D3DXCreateFontIndirectA(struct IDirect3DDevice9 *device,
490 const D3DXFONT_DESCA *desc, struct ID3DXFont **font);
491HRESULT WINAPI D3DXCreateFontIndirectW(struct IDirect3DDevice9 *device,
492 const D3DXFONT_DESCW *desc, struct ID3DXFont **font);
493#define D3DXCreateFontIndirect __MINGW_NAME_AW(D3DXCreateFontIndirect)
494HRESULT WINAPI D3DXCreateLine(struct IDirect3DDevice9 *device, struct ID3DXLine **line);
495HRESULT WINAPI D3DXCreateRenderToEnvMap(struct IDirect3DDevice9 *device, UINT size, UINT miplevels,
496 D3DFORMAT format, WINBOOL stencil, D3DFORMAT stencil_format, struct ID3DXRenderToEnvMap **rtem);
497HRESULT WINAPI D3DXCreateRenderToSurface(struct IDirect3DDevice9 *device, UINT width, UINT height,
498 D3DFORMAT format, WINBOOL stencil, D3DFORMAT stencil_format, struct ID3DXRenderToSurface **rts);
499HRESULT WINAPI D3DXCreateSprite(struct IDirect3DDevice9 *device, struct ID3DXSprite **sprite);
500WINBOOL WINAPI D3DXDebugMute(WINBOOL mute);
501UINT WINAPI D3DXGetDriverLevel(struct IDirect3DDevice9 *device);
502
503#ifdef __cplusplus
504}
505#endif
506
507#endif /* __WINE_D3DX9CORE_H */
Note: See TracBrowser for help on using the repository browser.