2 * Copyright (C) 2002 Raphael Junqueira
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_D3DX8CORE_H
20 #define __WINE_D3DX8CORE_H
25 #include "d3d8types.h"
28 /*****************************************************************************
29 * #defines and error codes
31 #define D3DXASM_DEBUG 1
32 #define D3DXASM_SKIPVALIDATION 2
35 #define MAKE_D3DXHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code )
40 #define D3DXERR_CANNOTATTRSORT MAKE_D3DXHRESULT(2158)
41 #define D3DXERR_CANNOTMODIFYINDEXBUFFER MAKE_D3DXHRESULT(2159)
42 #define D3DXERR_INVALIDMESH MAKE_D3DXHRESULT(2160)
43 #define D3DXERR_SKINNINGNOTSUPPORTED MAKE_D3DXHRESULT(2161)
44 #define D3DXERR_TOOMANYINFLUENCES MAKE_D3DXHRESULT(2162)
45 #define D3DXERR_INVALIDDATA MAKE_D3DXHRESULT(2163)
47 /*****************************************************************************
48 * Predeclare the interfaces
50 DEFINE_GUID(IID_ID3DXBuffer
, 0x1,0x1,0x4,0xB0,0xCF,0x98,0xFE,0xFD,0xFF,0x95,0x12);/* FIXME */
51 typedef struct ID3DXBuffer ID3DXBuffer
, *LPD3DXBUFFER
;
52 DEFINE_GUID(IID_ID3DXFont
, 0x1,0x1,0x4,0xB0,0xCF,0x98,0xFE,0xFD,0xFF,0x95,0x13);/* FIXME */
53 typedef struct ID3DXFont ID3DXFont
, *LPD3DXFONT
;
55 /*****************************************************************************
56 * ID3DXBuffer interface
59 #define INTERFACE ID3DXBuffer
60 #define ID3DXBuffer_METHODS \
62 STDMETHOD_(LPVOID,GetBufferPointer)(THIS) PURE; \
63 STDMETHOD_(DWORD,GetBufferSize)(THIS) PURE;
64 ICOM_DEFINE(ID3DXBuffer
,IUnknown
)
68 /*** IUnknown methods ***/
69 #define ID3DXBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
70 #define ID3DXBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
71 #define ID3DXBuffer_Release(p) (p)->lpVtbl->Release(p)
72 /*** ID3DXBuffer methods ***/
73 #define ID3DXBuffer_GetBufferPointer(p) (p)->lpVtbl->GetBufferPointer(p)
74 #define ID3DXBuffer_GetBufferSize(p) (p)->lpVtbl->GetBufferSize(p)
77 /*****************************************************************************
81 #define INTERFACE ID3DXFont
82 #define ID3DXFont_METHODS \
84 STDMETHOD(Begin)(THIS) PURE; \
85 STDMETHOD(DrawTextA)(THIS) PURE; \
86 STDMETHOD(End)(THIS) PURE;
87 ICOM_DEFINE(ID3DXFont
,IUnknown
)
91 /*** IUnknown methods ***/
92 #define ID3DXFont_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
93 #define ID3DXFont_AddRef(p) (p)->lpVtbl->AddRef(p)
94 #define ID3DXFont_Release(p) (p)->lpVtbl->Release(p)
95 /*** ID3DXFont methods ***/
96 #define ID3DXFont_Begin(p) (p)->lpVtbl->Begin(p)
97 #define ID3DXFont_DrawTextA(p,a,b,c,d,e)(p)->lpVtbl->DrawText(p,a,b,c,d,e)
98 #define ID3DXFont_End(p) (p)->lpVtbl->End(p)
101 /*************************************************************************************
104 HRESULT WINAPI
D3DXCreateBuffer(DWORD NumBytes
, LPD3DXBUFFER
* ppBuffer
);
105 HRESULT WINAPI
D3DXCreateFont(LPDIRECT3DDEVICE8 pDevice
, HFONT hFont
, LPD3DXFONT
* ppFont
);
106 UINT WINAPI
D3DXGetFVFVertexSize(DWORD FVF
);
107 HRESULT WINAPI
D3DXAssembleShader(LPCVOID pSrcData
, UINT SrcDataLen
, DWORD Flags
,
108 LPD3DXBUFFER
* ppConstants
,
109 LPD3DXBUFFER
* ppCompiledShader
,
110 LPD3DXBUFFER
* ppCompilationErrors
);
111 HRESULT WINAPI
D3DXAssembleShaderFromFileA(LPSTR pSrcFile
, DWORD Flags
,
112 LPD3DXBUFFER
* ppConstants
,
113 LPD3DXBUFFER
* ppCompiledShader
,
114 LPD3DXBUFFER
* ppCompilationErrors
);
115 HRESULT WINAPI
D3DXAssembleShaderFromFileW(LPSTR pSrcFile
, DWORD Flags
,
116 LPD3DXBUFFER
* ppConstants
,
117 LPD3DXBUFFER
* ppCompiledShader
,
118 LPD3DXBUFFER
* ppCompilationErrors
);
120 #endif /* __WINE_D3DX8CORE_H */