rasapi32: Update spec file.
[wine/zf.git] / include / d3dx9effect.h
blob5dd1e7542a560957b8d8cb361d8c2545953127c8
1 /*
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
19 #include "d3dx9.h"
21 #ifndef __D3DX9EFFECT_H__
22 #define __D3DX9EFFECT_H__
24 #define D3DXFX_DONOTSAVESTATE (1 << 0)
25 #define D3DXFX_DONOTSAVESHADERSTATE (1 << 1)
26 #define D3DXFX_DONOTSAVESAMPLERSTATE (1 << 2)
27 #define D3DXFX_NOT_CLONEABLE (1 << 11)
28 #define D3DXFX_LARGEADDRESSAWARE (1 << 17)
30 #define D3DX_PARAMETER_SHARED 1
31 #define D3DX_PARAMETER_LITERAL 2
32 #define D3DX_PARAMETER_ANNOTATION 4
34 typedef struct _D3DXEFFECT_DESC
36 const char *Creator;
37 UINT Parameters;
38 UINT Techniques;
39 UINT Functions;
40 } D3DXEFFECT_DESC;
42 typedef struct _D3DXPARAMETER_DESC
44 const char *Name;
45 const char *Semantic;
46 D3DXPARAMETER_CLASS Class;
47 D3DXPARAMETER_TYPE Type;
48 UINT Rows;
49 UINT Columns;
50 UINT Elements;
51 UINT Annotations;
52 UINT StructMembers;
53 DWORD Flags;
54 UINT Bytes;
55 } D3DXPARAMETER_DESC;
57 typedef struct _D3DXTECHNIQUE_DESC
59 const char *Name;
60 UINT Passes;
61 UINT Annotations;
62 } D3DXTECHNIQUE_DESC;
64 typedef struct _D3DXPASS_DESC
66 const char *Name;
67 UINT Annotations;
68 const DWORD *pVertexShaderFunction;
69 const DWORD *pPixelShaderFunction;
70 } D3DXPASS_DESC;
72 typedef struct _D3DXFUNCTION_DESC
74 const char *Name;
75 UINT Annotations;
76 } D3DXFUNCTION_DESC;
78 typedef struct ID3DXEffectPool *LPD3DXEFFECTPOOL;
80 DEFINE_GUID(IID_ID3DXEffectPool, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
82 #undef INTERFACE
83 #define INTERFACE ID3DXEffectPool
85 DECLARE_INTERFACE_(ID3DXEffectPool, IUnknown)
87 /*** IUnknown methods ***/
88 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
89 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
90 STDMETHOD_(ULONG, Release)(THIS) PURE;
92 #undef INTERFACE
94 typedef struct ID3DXBaseEffect *LPD3DXBASEEFFECT;
96 DEFINE_GUID(IID_ID3DXBaseEffect, 0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe);
98 #define INTERFACE ID3DXBaseEffect
100 DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown)
102 /*** IUnknown methods ***/
103 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
104 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
105 STDMETHOD_(ULONG, Release)(THIS) PURE;
106 /*** ID3DXBaseEffect methods ***/
107 STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
108 STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
109 STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
110 STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
111 STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
112 STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
113 STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
114 STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
115 STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
116 STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
117 STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
118 STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
119 STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
120 STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
121 STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
122 STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
123 STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
124 STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE;
125 STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE;
126 STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
127 STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
128 STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE;
129 STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
130 STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
131 STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
132 STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE;
133 STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
134 STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
135 STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
136 STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE;
137 STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
138 STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE;
139 STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
140 STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE;
141 STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
142 STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
143 STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
144 STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
145 STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
146 STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
147 STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
148 STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
149 STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
150 STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
151 STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
152 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
153 STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
154 STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
155 STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
156 STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
157 STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
158 STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
159 STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE;
160 STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
162 #undef INTERFACE
164 typedef struct ID3DXEffectStateManager *LPD3DXEFFECTSTATEMANAGER;
166 DEFINE_GUID(IID_ID3DXEffectStateManager, 0x79aab587, 0x6dbc, 0x4fa7, 0x82, 0xde, 0x37, 0xfa, 0x17, 0x81, 0xc5, 0xce);
168 #define INTERFACE ID3DXEffectStateManager
170 DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown)
172 /*** IUnknown methods ***/
173 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
174 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
175 STDMETHOD_(ULONG, Release)(THIS) PURE;
176 /*** ID3DXEffectStateManager methods ***/
177 STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) PURE;
178 STDMETHOD(SetMaterial)(THIS_ const D3DMATERIAL9 *material) PURE;
179 STDMETHOD(SetLight)(THIS_ DWORD index, const D3DLIGHT9 *light) PURE;
180 STDMETHOD(LightEnable)(THIS_ DWORD index, BOOL enable) PURE;
181 STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE state, DWORD value) PURE;
182 STDMETHOD(SetTexture)(THIS_ DWORD stage, struct IDirect3DBaseTexture9 *texture) PURE;
183 STDMETHOD(SetTextureStageState)(THIS_ DWORD stage, D3DTEXTURESTAGESTATETYPE type, DWORD value) PURE;
184 STDMETHOD(SetSamplerState)(THIS_ DWORD sampler, D3DSAMPLERSTATETYPE type, DWORD value) PURE;
185 STDMETHOD(SetNPatchMode)(THIS_ FLOAT num_segments) PURE;
186 STDMETHOD(SetFVF)(THIS_ DWORD format) PURE;
187 STDMETHOD(SetVertexShader)(THIS_ struct IDirect3DVertexShader9 *shader) PURE;
188 STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT register_index, const FLOAT *constant_data, UINT register_count) PURE;
189 STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT register_index, const INT *constant_data, UINT register_count) PURE;
190 STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT register_index, const BOOL *constant_data, UINT register_count) PURE;
191 STDMETHOD(SetPixelShader)(THIS_ struct IDirect3DPixelShader9 *shader) PURE;
192 STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT register_index, const FLOAT *constant_data, UINT register_count) PURE;
193 STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT register_index, const INT *constant_data, UINT register_count) PURE;
194 STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT register_index, const BOOL *constant_data, UINT register_count) PURE;
196 #undef INTERFACE
198 typedef struct ID3DXEffect *LPD3DXEFFECT;
200 #if D3DX_SDK_VERSION <= 25
201 DEFINE_GUID(IID_ID3DXEffect, 0xd165ccb1, 0x62b0, 0x4a33, 0xb3, 0xfa, 0xa9, 0x23, 0x00, 0x30, 0x5a, 0x11);
202 #elif D3DX_SDK_VERSION == 26
203 DEFINE_GUID(IID_ID3DXEffect, 0xc7b17651, 0x5420, 0x490e, 0x8a, 0x7f, 0x92, 0x36, 0x75, 0xa2, 0xd6, 0x87);
204 #else
205 DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0x0c, 0xd5);
206 #endif
208 #define INTERFACE ID3DXEffect
210 DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
212 /*** IUnknown methods ***/
213 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
214 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
215 STDMETHOD_(ULONG, Release)(THIS) PURE;
216 /*** ID3DXBaseEffect methods ***/
217 STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
218 STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
219 STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
220 STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
221 STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
222 STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
223 STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
224 STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
225 STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
226 STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
227 STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
228 STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
229 STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
230 STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
231 STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
232 STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
233 STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
234 STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE;
235 STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE;
236 STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
237 STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
238 STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE;
239 STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
240 STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
241 STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
242 STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE;
243 STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
244 STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
245 STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
246 STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE;
247 STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
248 STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE;
249 STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
250 STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE;
251 STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
252 STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
253 STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
254 STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
255 STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
256 STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
257 STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
258 STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
259 STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
260 STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
261 STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
262 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
263 STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
264 STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
265 STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
266 STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
267 STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
268 STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
269 STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE;
270 STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
271 /*** ID3DXEffect methods ***/
272 STDMETHOD(GetPool)(THIS_ ID3DXEffectPool **pool) PURE;
273 STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE technique) PURE;
274 STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE;
275 STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE technique) PURE;
276 STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE technique, D3DXHANDLE* next_technique) PURE;
277 STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE parameter, D3DXHANDLE technique) PURE;
278 STDMETHOD(Begin)(THIS_ UINT *passes, DWORD flags) PURE;
279 STDMETHOD(BeginPass)(THIS_ UINT pass) PURE;
280 STDMETHOD(CommitChanges)(THIS) PURE;
281 STDMETHOD(EndPass)(THIS) PURE;
282 STDMETHOD(End)(THIS) PURE;
283 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
284 STDMETHOD(OnLostDevice)(THIS) PURE;
285 STDMETHOD(OnResetDevice)(THIS) PURE;
286 STDMETHOD(SetStateManager)(THIS_ ID3DXEffectStateManager *manager) PURE;
287 STDMETHOD(GetStateManager)(THIS_ ID3DXEffectStateManager **manager) PURE;
288 STDMETHOD(BeginParameterBlock)(THIS) PURE;
289 STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE;
290 STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
291 #if D3DX_SDK_VERSION >= 26
292 STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
293 #endif
294 STDMETHOD(CloneEffect)(THIS_ struct IDirect3DDevice9 *device, struct ID3DXEffect **effect) PURE;
295 #if D3DX_SDK_VERSION >= 27
296 STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes) PURE;
297 #endif
300 #undef INTERFACE
302 typedef struct ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
304 DEFINE_GUID(IID_ID3DXEffectCompiler, 0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0);
306 #define INTERFACE ID3DXEffectCompiler
308 DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
310 /*** IUnknown methods ***/
311 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
312 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
313 STDMETHOD_(ULONG, Release)(THIS) PURE;
314 /*** ID3DXBaseEffect methods ***/
315 STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
316 STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
317 STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
318 STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
319 STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
320 STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
321 STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
322 STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
323 STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
324 STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
325 STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
326 STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
327 STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
328 STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
329 STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
330 STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
331 STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
332 STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE;
333 STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE;
334 STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
335 STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
336 STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE;
337 STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
338 STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
339 STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
340 STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE;
341 STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
342 STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
343 STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
344 STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE;
345 STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
346 STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE;
347 STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
348 STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE;
349 STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
350 STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
351 STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
352 STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
353 STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
354 STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
355 STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
356 STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
357 STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
358 STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
359 STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
360 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
361 STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
362 STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
363 STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
364 STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
365 STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
366 STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
367 STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE;
368 STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
369 /*** ID3DXEffectCompiler methods ***/
370 STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE;
371 STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE;
372 STDMETHOD(CompileEffect)(THIS_ DWORD flags, ID3DXBuffer **effect, ID3DXBuffer **error_msgs) PURE;
373 STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, const char *target, DWORD flags,
374 ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table) PURE;
376 #undef INTERFACE
378 #ifdef __cplusplus
379 extern "C" {
380 #endif
382 HRESULT WINAPI D3DXCreateEffectPool(ID3DXEffectPool **pool);
383 HRESULT WINAPI D3DXCreateEffect(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
384 const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
385 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
386 HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
387 const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
388 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
389 HRESULT WINAPI D3DXCreateEffectCompiler(const char *srcdata, UINT srcdatalen, const D3DXMACRO *defines,
390 ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **parse_errors);
391 HRESULT WINAPI D3DXCreateEffectFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile,
392 const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
393 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
394 HRESULT WINAPI D3DXCreateEffectFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
395 const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
396 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
397 #define D3DXCreateEffectFromFileEx WINELIB_NAME_AW(D3DXCreateEffectFromFileEx)
399 HRESULT WINAPI D3DXCreateEffectFromFileA(struct IDirect3DDevice9 *device, const char *srcfile,
400 const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
401 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
402 HRESULT WINAPI D3DXCreateEffectFromFileW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
403 const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
404 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
405 #define D3DXCreateEffectFromFile WINELIB_NAME_AW(D3DXCreateEffectFromFile)
407 HRESULT WINAPI D3DXCreateEffectFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
408 const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include,
409 const char *skip_constants, DWORD flags, struct ID3DXEffectPool *pool,
410 struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
411 HRESULT WINAPI D3DXCreateEffectFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
412 const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include,
413 const char *skip_constants, DWORD flags, struct ID3DXEffectPool *pool,
414 struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
415 #define D3DXCreateEffectFromResourceEx WINELIB_NAME_AW(D3DXCreateEffectFromResourceEx)
417 HRESULT WINAPI D3DXCreateEffectFromResourceA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
418 const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
419 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
420 HRESULT WINAPI D3DXCreateEffectFromResourceW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
421 const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
422 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
423 #define D3DXCreateEffectFromResource WINELIB_NAME_AW(D3DXCreateEffectFromResource)
425 HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(const char *srcfile, const D3DXMACRO *defines,
426 ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
427 HRESULT WINAPI D3DXCreateEffectCompilerFromFileW(const WCHAR *srcfile, const D3DXMACRO *defines,
428 ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
429 #define D3DXCreateEffectCompilerFromFile WINELIB_NAME_AW(D3DXCreateEffectCompilerFromFile)
431 HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA(HMODULE srcmodule, const char *srcresource,
432 const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags,
433 ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
434 HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule, const WCHAR *srcresource,
435 const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags,
436 ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
437 #define D3DXCreateEffectCompilerFromResource WINELIB_NAME_AW(D3DXCreateEffectCompilerFromResource)
439 HRESULT WINAPI D3DXDisassembleEffect(ID3DXEffect *effect, BOOL enable_color_code, ID3DXBuffer **disassembly);
441 #ifdef __cplusplus
443 #endif
445 #endif /* __D3DX9EFFECT_H__ */