VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/d3dx9core.h

最後變更 在這個檔案是 53206,由 vboxsync 提交於 10 年 前

Devices/vmsvga: header fixes

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette