netapi32/tests: Use BOOL type where appropriate.
[wine/wine-gecko.git] / include / d3dx9effect.h
blob25d1fd23f968c774f9d9990fd20d8e85a8525a7c
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 DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5);
202 #define INTERFACE ID3DXEffect
204 DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
206 /*** IUnknown methods ***/
207 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
208 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
209 STDMETHOD_(ULONG, Release)(THIS) PURE;
210 /*** ID3DXBaseEffect methods ***/
211 STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
212 STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
213 STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
214 STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
215 STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
216 STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
217 STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
218 STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
219 STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
220 STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
221 STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
222 STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
223 STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
224 STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
225 STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
226 STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
227 STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
228 STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE;
229 STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE;
230 STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
231 STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
232 STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE;
233 STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
234 STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
235 STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
236 STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE;
237 STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
238 STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
239 STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
240 STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE;
241 STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
242 STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE;
243 STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
244 STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE;
245 STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
246 STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
247 STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
248 STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
249 STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
250 STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
251 STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
252 STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
253 STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
254 STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
255 STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
256 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
257 STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
258 STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
259 STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
260 STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
261 STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
262 STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
263 STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE;
264 STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
265 /*** ID3DXEffect methods ***/
266 STDMETHOD(GetPool)(THIS_ ID3DXEffectPool **pool) PURE;
267 STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE technique) PURE;
268 STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE;
269 STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE technique) PURE;
270 STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE technique, D3DXHANDLE* next_technique) PURE;
271 STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE parameter, D3DXHANDLE technique) PURE;
272 STDMETHOD(Begin)(THIS_ UINT *passes, DWORD flags) PURE;
273 STDMETHOD(BeginPass)(THIS_ UINT pass) PURE;
274 STDMETHOD(CommitChanges)(THIS) PURE;
275 STDMETHOD(EndPass)(THIS) PURE;
276 STDMETHOD(End)(THIS) PURE;
277 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
278 STDMETHOD(OnLostDevice)(THIS) PURE;
279 STDMETHOD(OnResetDevice)(THIS) PURE;
280 STDMETHOD(SetStateManager)(THIS_ ID3DXEffectStateManager *manager) PURE;
281 STDMETHOD(GetStateManager)(THIS_ ID3DXEffectStateManager **manager) PURE;
282 STDMETHOD(BeginParameterBlock)(THIS) PURE;
283 STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE;
284 STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
285 STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
286 STDMETHOD(CloneEffect)(THIS_ struct IDirect3DDevice9 *device, struct ID3DXEffect **effect) PURE;
287 STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes) PURE;
289 #undef INTERFACE
291 typedef struct ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
293 DEFINE_GUID(IID_ID3DXEffectCompiler, 0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0);
295 #define INTERFACE ID3DXEffectCompiler
297 DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
299 /*** IUnknown methods ***/
300 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
301 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
302 STDMETHOD_(ULONG, Release)(THIS) PURE;
303 /*** ID3DXBaseEffect methods ***/
304 STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
305 STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
306 STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
307 STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
308 STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
309 STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
310 STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
311 STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
312 STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
313 STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
314 STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
315 STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
316 STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
317 STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
318 STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
319 STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
320 STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
321 STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE;
322 STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE;
323 STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
324 STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
325 STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE;
326 STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
327 STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
328 STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
329 STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE;
330 STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
331 STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
332 STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
333 STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE;
334 STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
335 STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE;
336 STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
337 STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE;
338 STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
339 STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
340 STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
341 STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
342 STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
343 STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
344 STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
345 STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
346 STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
347 STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
348 STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
349 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
350 STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
351 STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
352 STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
353 STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
354 STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
355 STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
356 STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE;
357 STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
358 /*** ID3DXEffectCompiler methods ***/
359 STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE;
360 STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE;
361 STDMETHOD(CompileEffect)(THIS_ DWORD flags, ID3DXBuffer **effect, ID3DXBuffer **error_msgs) PURE;
362 STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, const char *target, DWORD flags,
363 ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table) PURE;
365 #undef INTERFACE
367 #ifdef __cplusplus
368 extern "C" {
369 #endif
371 HRESULT WINAPI D3DXCreateEffectPool(ID3DXEffectPool **pool);
372 HRESULT WINAPI D3DXCreateEffect(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
373 const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
374 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
375 HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
376 const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
377 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
378 HRESULT WINAPI D3DXCreateEffectCompiler(const char *srcdata, UINT srcdatalen, const D3DXMACRO *defines,
379 ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **parse_errors);
380 HRESULT WINAPI D3DXCreateEffectFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile,
381 const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
382 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
383 HRESULT WINAPI D3DXCreateEffectFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
384 const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
385 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
386 #define D3DXCreateEffectFromFileEx WINELIB_NAME_AW(D3DXCreateEffectFromFileEx)
388 HRESULT WINAPI D3DXCreateEffectFromFileA(struct IDirect3DDevice9 *device, const char *srcfile,
389 const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
390 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
391 HRESULT WINAPI D3DXCreateEffectFromFileW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
392 const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
393 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
394 #define D3DXCreateEffectFromFile WINELIB_NAME_AW(D3DXCreateEffectFromFile)
396 HRESULT WINAPI D3DXCreateEffectFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
397 const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include,
398 const char *skip_constants, DWORD flags, struct ID3DXEffectPool *pool,
399 struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
400 HRESULT WINAPI D3DXCreateEffectFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
401 const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include,
402 const char *skip_constants, DWORD flags, struct ID3DXEffectPool *pool,
403 struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
404 #define D3DXCreateEffectFromResourceEx WINELIB_NAME_AW(D3DXCreateEffectFromResourceEx)
406 HRESULT WINAPI D3DXCreateEffectFromResourceA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
407 const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
408 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
409 HRESULT WINAPI D3DXCreateEffectFromResourceW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
410 const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
411 struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
412 #define D3DXCreateEffectFromResource WINELIB_NAME_AW(D3DXCreateEffectFromResource)
414 HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(const char *srcfile, const D3DXMACRO *defines,
415 ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
416 HRESULT WINAPI D3DXCreateEffectCompilerFromFileW(const WCHAR *srcfile, const D3DXMACRO *defines,
417 ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
418 #define D3DXCreateEffectCompilerFromFile WINELIB_NAME_AW(D3DXCreateEffectCompilerFromFile)
420 HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA(HMODULE srcmodule, const char *srcresource,
421 const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags,
422 ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
423 HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule, const WCHAR *srcresource,
424 const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags,
425 ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
426 #define D3DXCreateEffectCompilerFromResource WINELIB_NAME_AW(D3DXCreateEffectCompilerFromResource)
428 #ifdef __cplusplus
430 #endif
432 #endif /* __D3DX9EFFECT_H__ */