2 * Copyright 2010 Christian Costa
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __D3DX9EFFECT_H__
22 #define __D3DX9EFFECT_H__
24 typedef struct _D3DXEFFECT_DESC
{
31 typedef struct _D3DXPARAMETER_DESC
{
34 D3DXPARAMETER_CLASS Class
;
35 D3DXPARAMETER_TYPE Type
;
45 typedef struct _D3DXTECHNIQUE_DESC
{
51 typedef struct _D3DXPASS_DESC
{
54 CONST DWORD
*pVertexShaderFunction
;
55 CONST DWORD
*pPixelShaderFunction
;
58 typedef struct _D3DXFUNCTION_DESC
{
63 typedef struct ID3DXEffectPool
*LPD3DXEFFECTPOOL
;
65 DEFINE_GUID(IID_ID3DXEffectPool
, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
68 #define INTERFACE ID3DXEffectPool
70 DECLARE_INTERFACE_(ID3DXEffectPool
, IUnknown
)
72 /*** IUnknown methods ***/
73 STDMETHOD(QueryInterface
)(THIS_ REFIID riid
, LPVOID
* object
) PURE
;
74 STDMETHOD_(ULONG
, AddRef
)(THIS
) PURE
;
75 STDMETHOD_(ULONG
, Release
)(THIS
) PURE
;
78 typedef struct ID3DXBaseEffect
*LPD3DXBASEEFFECT
;
80 DEFINE_GUID(IID_ID3DXBaseEffect
, 0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe);
83 #define INTERFACE ID3DXBaseEffect
85 DECLARE_INTERFACE_(ID3DXBaseEffect
, IUnknown
)
87 /*** IUnknown methods ***/
88 STDMETHOD(QueryInterface
)(THIS_ REFIID riid
, LPVOID
* object
) PURE
;
89 STDMETHOD_(ULONG
, AddRef
)(THIS
) PURE
;
90 STDMETHOD_(ULONG
, Release
)(THIS
) PURE
;
91 /*** ID3DXBaseEffect methods ***/
92 STDMETHOD(GetDesc
)(THIS_ D3DXEFFECT_DESC
* desc
) PURE
;
93 STDMETHOD(GetParameterDesc
)(THIS_ D3DXHANDLE parameter
, D3DXPARAMETER_DESC
* desc
) PURE
;
94 STDMETHOD(GetTechniqueDesc
)(THIS_ D3DXHANDLE technique
, D3DXTECHNIQUE_DESC
* desc
) PURE
;
95 STDMETHOD(GetPassDesc
)(THIS_ D3DXHANDLE pass
, D3DXPASS_DESC
* desc
) PURE
;
96 STDMETHOD(GetFunctionDesc
)(THIS_ D3DXHANDLE shader
, D3DXFUNCTION_DESC
* desc
) PURE
;
97 STDMETHOD_(D3DXHANDLE
, GetParameter
)(THIS_ D3DXHANDLE parameter
, UINT index
) PURE
;
98 STDMETHOD_(D3DXHANDLE
, GetParameterByName
)(THIS_ D3DXHANDLE parameter
, LPCSTR name
) PURE
;
99 STDMETHOD_(D3DXHANDLE
, GetParameterBySemantic
)(THIS_ D3DXHANDLE parameter
, LPCSTR semantic
) PURE
;
100 STDMETHOD_(D3DXHANDLE
, GetParameterElement
)(THIS_ D3DXHANDLE parameter
, UINT index
) PURE
;
101 STDMETHOD_(D3DXHANDLE
, GetTechnique
)(THIS_ UINT index
) PURE
;
102 STDMETHOD_(D3DXHANDLE
, GetTechniqueByName
)(THIS_ LPCSTR name
) PURE
;
103 STDMETHOD_(D3DXHANDLE
, GetPass
)(THIS_ D3DXHANDLE technique
, UINT index
) PURE
;
104 STDMETHOD_(D3DXHANDLE
, GetPassByName
)(THIS_ D3DXHANDLE technique
, LPCSTR name
) PURE
;
105 STDMETHOD_(D3DXHANDLE
, GetFunction
)(THIS_ UINT index
);
106 STDMETHOD_(D3DXHANDLE
, GetFunctionByName
)(THIS_ LPCSTR name
);
107 STDMETHOD_(D3DXHANDLE
, GetAnnotation
)(THIS_ D3DXHANDLE object
, UINT index
) PURE
;
108 STDMETHOD_(D3DXHANDLE
, GetAnnotationByName
)(THIS_ D3DXHANDLE object
, LPCSTR name
) PURE
;
109 STDMETHOD(SetValue
)(THIS_ D3DXHANDLE parameter
, LPCVOID data
, UINT bytes
) PURE
;
110 STDMETHOD(GetValue
)(THIS_ D3DXHANDLE parameter
, LPVOID data
, UINT bytes
) PURE
;
111 STDMETHOD(SetBool
)(THIS_ D3DXHANDLE parameter
, BOOL b
) PURE
;
112 STDMETHOD(GetBool
)(THIS_ D3DXHANDLE parameter
, BOOL
* b
) PURE
;
113 STDMETHOD(SetBoolArray
)(THIS_ D3DXHANDLE parameter
, CONST BOOL
* b
, UINT count
) PURE
;
114 STDMETHOD(GetBoolArray
)(THIS_ D3DXHANDLE parameter
, BOOL
* b
, UINT count
) PURE
;
115 STDMETHOD(SetInt
)(THIS_ D3DXHANDLE parameter
, INT n
) PURE
;
116 STDMETHOD(GetInt
)(THIS_ D3DXHANDLE parameter
, INT
* n
) PURE
;
117 STDMETHOD(SetIntArray
)(THIS_ D3DXHANDLE parameter
, CONST INT
* n
, UINT count
) PURE
;
118 STDMETHOD(GetIntArray
)(THIS_ D3DXHANDLE parameter
, INT
* n
, UINT count
) PURE
;
119 STDMETHOD(SetFloat
)(THIS_ D3DXHANDLE parameter
, FLOAT f
) PURE
;
120 STDMETHOD(GetFloat
)(THIS_ D3DXHANDLE parameter
, FLOAT
* f
) PURE
;
121 STDMETHOD(SetFloatArray
)(THIS_ D3DXHANDLE parameter
, CONST FLOAT
* f
, UINT count
) PURE
;
122 STDMETHOD(GetFloatArray
)(THIS_ D3DXHANDLE parameter
, FLOAT
* f
, UINT count
) PURE
;
123 STDMETHOD(SetVector
)(THIS_ D3DXHANDLE parameter
, CONST D3DXVECTOR4
* vector
) PURE
;
124 STDMETHOD(GetVector
)(THIS_ D3DXHANDLE parameter
, D3DXVECTOR4
* vector
) PURE
;
125 STDMETHOD(SetVectorArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXVECTOR4
* vector
, UINT count
) PURE
;
126 STDMETHOD(GetVectorArray
)(THIS_ D3DXHANDLE parameter
, D3DXVECTOR4
* vector
, UINT count
) PURE
;
127 STDMETHOD(SetMatrix
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
) PURE
;
128 STDMETHOD(GetMatrix
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
) PURE
;
129 STDMETHOD(SetMatrixArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
, UINT count
) PURE
;
130 STDMETHOD(GetMatrixArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
, UINT count
) PURE
;
131 STDMETHOD(SetMatrixPointerArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
** matrix
, UINT count
) PURE
;
132 STDMETHOD(GetMatrixPointerArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
** matrix
, UINT count
) PURE
;
133 STDMETHOD(SetMatrixTranspose
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
) PURE
;
134 STDMETHOD(GetMatrixTranspose
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
) PURE
;
135 STDMETHOD(SetMatrixTransposeArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
, UINT count
) PURE
;
136 STDMETHOD(GetMatrixTransposeArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
, UINT count
) PURE
;
137 STDMETHOD(SetMatrixTransposePointerArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
** matrix
, UINT count
) PURE
;
138 STDMETHOD(GetMatrixTransposePointerArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
** matrix
, UINT count
) PURE
;
139 STDMETHOD(SetString
)(THIS_ D3DXHANDLE parameter
, LPCSTR string
) PURE
;
140 STDMETHOD(GetString
)(THIS_ D3DXHANDLE parameter
, LPCSTR
* string
) PURE
;
141 STDMETHOD(SetTexture
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DBASETEXTURE9 texture
) PURE
;
142 STDMETHOD(GetTexture
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DBASETEXTURE9
* texture
) PURE
;
143 STDMETHOD(GetPixelShader
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DPIXELSHADER9
* pshader
) PURE
;
144 STDMETHOD(GetVertexShader
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DVERTEXSHADER9
* vshader
) PURE
;
145 STDMETHOD(SetArrayRange
)(THIS_ D3DXHANDLE parameter
, UINT start
, UINT end
) PURE
;
148 typedef struct ID3DXEffectStateManager
*LPD3DXEFFECTSTATEMANAGER
;
150 DEFINE_GUID(IID_ID3DXEffectStateManager
, 0x79aab587, 0x6dbc, 0x4fa7, 0x82, 0xde, 0x37, 0xfa, 0x17, 0x81, 0xc5, 0xce);
153 #define INTERFACE ID3DXEffectStateManager
155 DECLARE_INTERFACE_(ID3DXEffectStateManager
, IUnknown
)
157 /*** IUnknown methods ***/
158 STDMETHOD(QueryInterface
)(THIS_ REFIID riid
, LPVOID
* object
) PURE
;
159 STDMETHOD_(ULONG
, AddRef
)(THIS
) PURE
;
160 STDMETHOD_(ULONG
, Release
)(THIS
) PURE
;
161 /*** ID3DXEffectStateManager methods ***/
162 STDMETHOD(SetTransform
)(THIS_ D3DTRANSFORMSTATETYPE state
, CONST D3DMATRIX
* matrix
) PURE
;
163 STDMETHOD(SetMaterial
)(THIS_ CONST D3DMATERIAL9
* material
) PURE
;
164 STDMETHOD(SetLight
)(THIS_ DWORD index
, CONST D3DLIGHT9
* light
) PURE
;
165 STDMETHOD(LightEnable
)(THIS_ DWORD index
, BOOL enable
) PURE
;
166 STDMETHOD(SetRenderState
)(THIS_ D3DRENDERSTATETYPE state
, DWORD value
) PURE
;
167 STDMETHOD(SetTexture
)(THIS_ DWORD stage
, LPDIRECT3DBASETEXTURE9 texture
) PURE
;
168 STDMETHOD(SetTextureStageState
)(THIS_ DWORD stage
, D3DTEXTURESTAGESTATETYPE type
, DWORD value
) PURE
;
169 STDMETHOD(SetSamplerState
)(THIS_ DWORD sampler
, D3DSAMPLERSTATETYPE type
, DWORD value
) PURE
;
170 STDMETHOD(SetNPatchMode
)(THIS_ FLOAT num_segments
) PURE
;
171 STDMETHOD(SetFVF
)(THIS_ DWORD format
) PURE
;
172 STDMETHOD(SetVertexShader
)(THIS_ LPDIRECT3DVERTEXSHADER9 shader
) PURE
;
173 STDMETHOD(SetVertexShaderConstantF
)(THIS_ UINT register_index
, CONST FLOAT
* constant_data
, UINT register_count
) PURE
;
174 STDMETHOD(SetVertexShaderConstantI
)(THIS_ UINT register_index
, CONST INT
* constant_data
, UINT register_count
) PURE
;
175 STDMETHOD(SetVertexShaderConstantB
)(THIS_ UINT register_index
, CONST BOOL
* constant_data
, UINT register_count
) PURE
;
176 STDMETHOD(SetPixelShader
)(THIS_ LPDIRECT3DPIXELSHADER9 shader
) PURE
;
177 STDMETHOD(SetPixelShaderConstantF
)(THIS_ UINT register_index
, CONST FLOAT
* constant_data
, UINT register_count
) PURE
;
178 STDMETHOD(SetPixelShaderConstantI
)(THIS_ UINT register_index
, CONST INT
* constant_data
, UINT register_count
) PURE
;
179 STDMETHOD(SetPixelShaderConstantB
)(THIS_ UINT register_index
, CONST BOOL
* constant_data
, UINT register_count
) PURE
;
182 typedef struct ID3DXEffect
*LPD3DXEFFECT
;
184 DEFINE_GUID(IID_ID3DXEffect
, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5);
187 #define INTERFACE ID3DXEffect
189 DECLARE_INTERFACE_(ID3DXEffect
, ID3DXBaseEffect
)
191 /*** IUnknown methods ***/
192 STDMETHOD(QueryInterface
)(THIS_ REFIID riid
, LPVOID
* object
) PURE
;
193 STDMETHOD_(ULONG
, AddRef
)(THIS
) PURE
;
194 STDMETHOD_(ULONG
, Release
)(THIS
) PURE
;
195 /*** ID3DXBaseEffect methods ***/
196 STDMETHOD(GetDesc
)(THIS_ D3DXEFFECT_DESC
* desc
) PURE
;
197 STDMETHOD(GetParameterDesc
)(THIS_ D3DXHANDLE parameter
, D3DXPARAMETER_DESC
* desc
) PURE
;
198 STDMETHOD(GetTechniqueDesc
)(THIS_ D3DXHANDLE technique
, D3DXTECHNIQUE_DESC
* desc
) PURE
;
199 STDMETHOD(GetPassDesc
)(THIS_ D3DXHANDLE pass
, D3DXPASS_DESC
* desc
) PURE
;
200 STDMETHOD(GetFunctionDesc
)(THIS_ D3DXHANDLE shader
, D3DXFUNCTION_DESC
* desc
) PURE
;
201 STDMETHOD_(D3DXHANDLE
, GetParameter
)(THIS_ D3DXHANDLE parameter
, UINT index
) PURE
;
202 STDMETHOD_(D3DXHANDLE
, GetParameterByName
)(THIS_ D3DXHANDLE parameter
, LPCSTR name
) PURE
;
203 STDMETHOD_(D3DXHANDLE
, GetParameterBySemantic
)(THIS_ D3DXHANDLE parameter
, LPCSTR semantic
) PURE
;
204 STDMETHOD_(D3DXHANDLE
, GetParameterElement
)(THIS_ D3DXHANDLE parameter
, UINT index
) PURE
;
205 STDMETHOD_(D3DXHANDLE
, GetTechnique
)(THIS_ UINT index
) PURE
;
206 STDMETHOD_(D3DXHANDLE
, GetTechniqueByName
)(THIS_ LPCSTR name
) PURE
;
207 STDMETHOD_(D3DXHANDLE
, GetPass
)(THIS_ D3DXHANDLE technique
, UINT index
) PURE
;
208 STDMETHOD_(D3DXHANDLE
, GetPassByName
)(THIS_ D3DXHANDLE technique
, LPCSTR name
) PURE
;
209 STDMETHOD_(D3DXHANDLE
, GetFunction
)(THIS_ UINT index
);
210 STDMETHOD_(D3DXHANDLE
, GetFunctionByName
)(THIS_ LPCSTR name
);
211 STDMETHOD_(D3DXHANDLE
, GetAnnotation
)(THIS_ D3DXHANDLE object
, UINT index
) PURE
;
212 STDMETHOD_(D3DXHANDLE
, GetAnnotationByName
)(THIS_ D3DXHANDLE object
, LPCSTR name
) PURE
;
213 STDMETHOD(SetValue
)(THIS_ D3DXHANDLE parameter
, LPCVOID data
, UINT bytes
) PURE
;
214 STDMETHOD(GetValue
)(THIS_ D3DXHANDLE parameter
, LPVOID data
, UINT bytes
) PURE
;
215 STDMETHOD(SetBool
)(THIS_ D3DXHANDLE parameter
, BOOL b
) PURE
;
216 STDMETHOD(GetBool
)(THIS_ D3DXHANDLE parameter
, BOOL
* b
) PURE
;
217 STDMETHOD(SetBoolArray
)(THIS_ D3DXHANDLE parameter
, CONST BOOL
* b
, UINT count
) PURE
;
218 STDMETHOD(GetBoolArray
)(THIS_ D3DXHANDLE parameter
, BOOL
* b
, UINT count
) PURE
;
219 STDMETHOD(SetInt
)(THIS_ D3DXHANDLE parameter
, INT n
) PURE
;
220 STDMETHOD(GetInt
)(THIS_ D3DXHANDLE parameter
, INT
* n
) PURE
;
221 STDMETHOD(SetIntArray
)(THIS_ D3DXHANDLE parameter
, CONST INT
* n
, UINT count
) PURE
;
222 STDMETHOD(GetIntArray
)(THIS_ D3DXHANDLE parameter
, INT
* n
, UINT count
) PURE
;
223 STDMETHOD(SetFloat
)(THIS_ D3DXHANDLE parameter
, FLOAT f
) PURE
;
224 STDMETHOD(GetFloat
)(THIS_ D3DXHANDLE parameter
, FLOAT
* f
) PURE
;
225 STDMETHOD(SetFloatArray
)(THIS_ D3DXHANDLE parameter
, CONST FLOAT
* f
, UINT count
) PURE
;
226 STDMETHOD(GetFloatArray
)(THIS_ D3DXHANDLE parameter
, FLOAT
* f
, UINT count
) PURE
;
227 STDMETHOD(SetVector
)(THIS_ D3DXHANDLE parameter
, CONST D3DXVECTOR4
* vector
) PURE
;
228 STDMETHOD(GetVector
)(THIS_ D3DXHANDLE parameter
, D3DXVECTOR4
* vector
) PURE
;
229 STDMETHOD(SetVectorArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXVECTOR4
* vector
, UINT count
) PURE
;
230 STDMETHOD(GetVectorArray
)(THIS_ D3DXHANDLE parameter
, D3DXVECTOR4
* vector
, UINT count
) PURE
;
231 STDMETHOD(SetMatrix
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
) PURE
;
232 STDMETHOD(GetMatrix
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
) PURE
;
233 STDMETHOD(SetMatrixArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
, UINT count
) PURE
;
234 STDMETHOD(GetMatrixArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
, UINT count
) PURE
;
235 STDMETHOD(SetMatrixPointerArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
** matrix
, UINT count
) PURE
;
236 STDMETHOD(GetMatrixPointerArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
** matrix
, UINT count
) PURE
;
237 STDMETHOD(SetMatrixTranspose
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
) PURE
;
238 STDMETHOD(GetMatrixTranspose
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
) PURE
;
239 STDMETHOD(SetMatrixTransposeArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
, UINT count
) PURE
;
240 STDMETHOD(GetMatrixTransposeArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
, UINT count
) PURE
;
241 STDMETHOD(SetMatrixTransposePointerArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
** matrix
, UINT count
) PURE
;
242 STDMETHOD(GetMatrixTransposePointerArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
** matrix
, UINT count
) PURE
;
243 STDMETHOD(SetString
)(THIS_ D3DXHANDLE parameter
, LPCSTR string
) PURE
;
244 STDMETHOD(GetString
)(THIS_ D3DXHANDLE parameter
, LPCSTR
* string
) PURE
;
245 STDMETHOD(SetTexture
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DBASETEXTURE9 texture
) PURE
;
246 STDMETHOD(GetTexture
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DBASETEXTURE9
* texture
) PURE
;
247 STDMETHOD(GetPixelShader
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DPIXELSHADER9
* pshader
) PURE
;
248 STDMETHOD(GetVertexShader
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DVERTEXSHADER9
* vshader
) PURE
;
249 STDMETHOD(SetArrayRange
)(THIS_ D3DXHANDLE parameter
, UINT start
, UINT end
) PURE
;
250 /*** ID3DXEffect methods ***/
251 STDMETHOD(GetPool
)(THIS_ LPD3DXEFFECTPOOL
* pool
) PURE
;
252 STDMETHOD(SetTechnique
)(THIS_ D3DXHANDLE technique
) PURE
;
253 STDMETHOD_(D3DXHANDLE
, GetCurrentTechnique
)(THIS
) PURE
;
254 STDMETHOD(ValidateTechnique
)(THIS_ D3DXHANDLE technique
) PURE
;
255 STDMETHOD(FindNextValidTechnique
)(THIS_ D3DXHANDLE technique
, D3DXHANDLE
* next_technique
) PURE
;
256 STDMETHOD_(BOOL
, IsParameterUsed
)(THIS_ D3DXHANDLE parameter
, D3DXHANDLE technique
) PURE
;
257 STDMETHOD(Begin
)(THIS_ UINT
*passes
, DWORD flags
) PURE
;
258 STDMETHOD(BeginPass
)(THIS_ UINT pass
) PURE
;
259 STDMETHOD(CommitChanges
)(THIS
) PURE
;
260 STDMETHOD(EndPass
)(THIS
) PURE
;
261 STDMETHOD(End
)(THIS
) PURE
;
262 STDMETHOD(GetDevice
)(THIS_ LPDIRECT3DDEVICE9
* device
) PURE
;
263 STDMETHOD(OnLostDevice
)(THIS
) PURE
;
264 STDMETHOD(OnResetDevice
)(THIS
) PURE
;
265 STDMETHOD(SetStateManager
)(THIS_ LPD3DXEFFECTSTATEMANAGER manager
) PURE
;
266 STDMETHOD(GetStateManager
)(THIS_ LPD3DXEFFECTSTATEMANAGER
* manager
) PURE
;
267 STDMETHOD(BeginParameterBlock
)(THIS
) PURE
;
268 STDMETHOD_(D3DXHANDLE
, EndParameterBlock
)(THIS
) PURE
;
269 STDMETHOD(ApplyParameterBlock
)(THIS_ D3DXHANDLE parameter_block
) PURE
;
270 STDMETHOD(DeleteParameterBlock
)(THIS_ D3DXHANDLE parameter_block
) PURE
;
271 STDMETHOD(CloneEffect
)(THIS_ LPDIRECT3DDEVICE9 device
, LPD3DXEFFECT
* effect
) PURE
;
272 STDMETHOD(SetRawValue
)(THIS_ D3DXHANDLE parameter
, LPCVOID data
, UINT byte_offset
, UINT bytes
) PURE
;
275 typedef struct ID3DXEffectCompiler
*LPD3DXEFFECTCOMPILER
;
277 DEFINE_GUID(IID_ID3DXEffectCompiler
, 0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0);
280 #define INTERFACE ID3DXEffectCompiler
282 DECLARE_INTERFACE_(ID3DXEffectCompiler
, ID3DXBaseEffect
)
284 /*** IUnknown methods ***/
285 STDMETHOD(QueryInterface
)(THIS_ REFIID riid
, LPVOID
* object
) PURE
;
286 STDMETHOD_(ULONG
, AddRef
)(THIS
) PURE
;
287 STDMETHOD_(ULONG
, Release
)(THIS
) PURE
;
288 /*** ID3DXBaseEffect methods ***/
289 STDMETHOD(GetDesc
)(THIS_ D3DXEFFECT_DESC
* desc
) PURE
;
290 STDMETHOD(GetParameterDesc
)(THIS_ D3DXHANDLE parameter
, D3DXPARAMETER_DESC
* desc
) PURE
;
291 STDMETHOD(GetTechniqueDesc
)(THIS_ D3DXHANDLE technique
, D3DXTECHNIQUE_DESC
* desc
) PURE
;
292 STDMETHOD(GetPassDesc
)(THIS_ D3DXHANDLE pass
, D3DXPASS_DESC
* desc
) PURE
;
293 STDMETHOD(GetFunctionDesc
)(THIS_ D3DXHANDLE shader
, D3DXFUNCTION_DESC
* desc
) PURE
;
294 STDMETHOD_(D3DXHANDLE
, GetParameter
)(THIS_ D3DXHANDLE parameter
, UINT index
) PURE
;
295 STDMETHOD_(D3DXHANDLE
, GetParameterByName
)(THIS_ D3DXHANDLE parameter
, LPCSTR name
) PURE
;
296 STDMETHOD_(D3DXHANDLE
, GetParameterBySemantic
)(THIS_ D3DXHANDLE parameter
, LPCSTR semantic
) PURE
;
297 STDMETHOD_(D3DXHANDLE
, GetParameterElement
)(THIS_ D3DXHANDLE parameter
, UINT index
) PURE
;
298 STDMETHOD_(D3DXHANDLE
, GetTechnique
)(THIS_ UINT index
) PURE
;
299 STDMETHOD_(D3DXHANDLE
, GetTechniqueByName
)(THIS_ LPCSTR name
) PURE
;
300 STDMETHOD_(D3DXHANDLE
, GetPass
)(THIS_ D3DXHANDLE technique
, UINT index
) PURE
;
301 STDMETHOD_(D3DXHANDLE
, GetPassByName
)(THIS_ D3DXHANDLE technique
, LPCSTR name
) PURE
;
302 STDMETHOD_(D3DXHANDLE
, GetFunction
)(THIS_ UINT index
);
303 STDMETHOD_(D3DXHANDLE
, GetFunctionByName
)(THIS_ LPCSTR name
);
304 STDMETHOD_(D3DXHANDLE
, GetAnnotation
)(THIS_ D3DXHANDLE object
, UINT index
) PURE
;
305 STDMETHOD_(D3DXHANDLE
, GetAnnotationByName
)(THIS_ D3DXHANDLE object
, LPCSTR name
) PURE
;
306 STDMETHOD(SetValue
)(THIS_ D3DXHANDLE parameter
, LPCVOID data
, UINT bytes
) PURE
;
307 STDMETHOD(GetValue
)(THIS_ D3DXHANDLE parameter
, LPVOID data
, UINT bytes
) PURE
;
308 STDMETHOD(SetBool
)(THIS_ D3DXHANDLE parameter
, BOOL b
) PURE
;
309 STDMETHOD(GetBool
)(THIS_ D3DXHANDLE parameter
, BOOL
* b
) PURE
;
310 STDMETHOD(SetBoolArray
)(THIS_ D3DXHANDLE parameter
, CONST BOOL
* b
, UINT count
) PURE
;
311 STDMETHOD(GetBoolArray
)(THIS_ D3DXHANDLE parameter
, BOOL
* b
, UINT count
) PURE
;
312 STDMETHOD(SetInt
)(THIS_ D3DXHANDLE parameter
, INT n
) PURE
;
313 STDMETHOD(GetInt
)(THIS_ D3DXHANDLE parameter
, INT
* n
) PURE
;
314 STDMETHOD(SetIntArray
)(THIS_ D3DXHANDLE parameter
, CONST INT
* n
, UINT count
) PURE
;
315 STDMETHOD(GetIntArray
)(THIS_ D3DXHANDLE parameter
, INT
* n
, UINT count
) PURE
;
316 STDMETHOD(SetFloat
)(THIS_ D3DXHANDLE parameter
, FLOAT f
) PURE
;
317 STDMETHOD(GetFloat
)(THIS_ D3DXHANDLE parameter
, FLOAT
* f
) PURE
;
318 STDMETHOD(SetFloatArray
)(THIS_ D3DXHANDLE parameter
, CONST FLOAT
* f
, UINT count
) PURE
;
319 STDMETHOD(GetFloatArray
)(THIS_ D3DXHANDLE parameter
, FLOAT
* f
, UINT count
) PURE
;
320 STDMETHOD(SetVector
)(THIS_ D3DXHANDLE parameter
, CONST D3DXVECTOR4
* vector
) PURE
;
321 STDMETHOD(GetVector
)(THIS_ D3DXHANDLE parameter
, D3DXVECTOR4
* vector
) PURE
;
322 STDMETHOD(SetVectorArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXVECTOR4
* vector
, UINT count
) PURE
;
323 STDMETHOD(GetVectorArray
)(THIS_ D3DXHANDLE parameter
, D3DXVECTOR4
* vector
, UINT count
) PURE
;
324 STDMETHOD(SetMatrix
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
) PURE
;
325 STDMETHOD(GetMatrix
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
) PURE
;
326 STDMETHOD(SetMatrixArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
, UINT count
) PURE
;
327 STDMETHOD(GetMatrixArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
, UINT count
) PURE
;
328 STDMETHOD(SetMatrixPointerArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
** matrix
, UINT count
) PURE
;
329 STDMETHOD(GetMatrixPointerArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
** matrix
, UINT count
) PURE
;
330 STDMETHOD(SetMatrixTranspose
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
) PURE
;
331 STDMETHOD(GetMatrixTranspose
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
) PURE
;
332 STDMETHOD(SetMatrixTransposeArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
* matrix
, UINT count
) PURE
;
333 STDMETHOD(GetMatrixTransposeArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
* matrix
, UINT count
) PURE
;
334 STDMETHOD(SetMatrixTransposePointerArray
)(THIS_ D3DXHANDLE parameter
, CONST D3DXMATRIX
** matrix
, UINT count
) PURE
;
335 STDMETHOD(GetMatrixTransposePointerArray
)(THIS_ D3DXHANDLE parameter
, D3DXMATRIX
** matrix
, UINT count
) PURE
;
336 STDMETHOD(SetString
)(THIS_ D3DXHANDLE parameter
, LPCSTR string
) PURE
;
337 STDMETHOD(GetString
)(THIS_ D3DXHANDLE parameter
, LPCSTR
* string
) PURE
;
338 STDMETHOD(SetTexture
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DBASETEXTURE9 texture
) PURE
;
339 STDMETHOD(GetTexture
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DBASETEXTURE9
* texture
) PURE
;
340 STDMETHOD(SetPixelShader
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DPIXELSHADER9 pshader
) PURE
;
341 STDMETHOD(GetPixelShader
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DPIXELSHADER9
* pshader
) PURE
;
342 STDMETHOD(SetVertexShader
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DVERTEXSHADER9 vshader
) PURE
;
343 STDMETHOD(GetVertexShader
)(THIS_ D3DXHANDLE parameter
, LPDIRECT3DVERTEXSHADER9
* vshader
) PURE
;
344 STDMETHOD(SetArrayRange
)(THIS_ D3DXHANDLE parameter
, UINT start
, UINT end
) PURE
;
345 /*** ID3DXEffectCompiler methods ***/
346 STDMETHOD(SetLiteral
)(THIS_ D3DXHANDLE parameter
, BOOL literal
) PURE
;
347 STDMETHOD(GetLiteral
)(THIS_ D3DXHANDLE parameter
, BOOL
* literal
) PURE
;
348 STDMETHOD(CompileEffect
)(THIS_ DWORD flags
, LPD3DXBUFFER
* effect
, LPD3DXBUFFER
* error_msgs
) PURE
;
349 STDMETHOD(CompileShader
)(THIS_ D3DXHANDLE function
, LPCSTR target
, DWORD flags
, LPD3DXBUFFER
* shader
,
350 LPD3DXBUFFER
* error_msgs
, LPD3DXCONSTANTTABLE
* constant_table
) PURE
;
358 HRESULT WINAPI
D3DXCreateEffectPool(LPD3DXEFFECTPOOL
* pool
);
360 HRESULT WINAPI
D3DXCreateEffect(LPDIRECT3DDEVICE9 device
,
363 CONST D3DXMACRO
* defines
,
364 LPD3DXINCLUDE include
,
366 LPD3DXEFFECTPOOL pool
,
367 LPD3DXEFFECT
* effect
,
368 LPD3DXBUFFER
* compilation_errors
);
370 HRESULT WINAPI
D3DXCreateEffectEx(LPDIRECT3DDEVICE9 device
,
373 CONST D3DXMACRO
* defines
,
374 LPD3DXINCLUDE include
,
375 LPCSTR skip_constants
,
377 LPD3DXEFFECTPOOL pool
,
378 LPD3DXEFFECT
* effect
,
379 LPD3DXBUFFER
* compilation_errors
);
381 HRESULT WINAPI
D3DXCreateEffectCompiler(LPCSTR srcdata
,
383 CONST D3DXMACRO
* defines
,
384 LPD3DXINCLUDE include
,
386 LPD3DXEFFECTCOMPILER
* compiler
,
387 LPD3DXBUFFER
* parse_errors
);
393 #endif /* __D3DX9EFFECT_H__ */