server: Remove superflous NULL check (Coverity).
[wine/multimedia.git] / include / d3dx9effect.h
blobe0d1de5efe8b1f0d9c8eff24e87e4dcf955e127d
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 D3DX_PARAMETER_SHARED 1
25 #define D3DX_PARAMETER_LITERAL 2
26 #define D3DX_PARAMETER_ANNOTATION 4
28 typedef struct _D3DXEFFECT_DESC {
29 LPCSTR Creator;
30 UINT Parameters;
31 UINT Techniques;
32 UINT Functions;
33 } D3DXEFFECT_DESC;
35 typedef struct _D3DXPARAMETER_DESC {
36 LPCSTR Name;
37 LPCSTR Semantic;
38 D3DXPARAMETER_CLASS Class;
39 D3DXPARAMETER_TYPE Type;
40 UINT Rows;
41 UINT Columns;
42 UINT Elements;
43 UINT Annotations;
44 UINT StructMembers;
45 DWORD Flags;
46 UINT Bytes;
47 } D3DXPARAMETER_DESC;
49 typedef struct _D3DXTECHNIQUE_DESC {
50 LPCSTR Name;
51 UINT Passes;
52 UINT Annotations;
53 } D3DXTECHNIQUE_DESC;
55 typedef struct _D3DXPASS_DESC {
56 LPCSTR Name;
57 UINT Annotations;
58 CONST DWORD *pVertexShaderFunction;
59 CONST DWORD *pPixelShaderFunction;
60 } D3DXPASS_DESC;
62 typedef struct _D3DXFUNCTION_DESC {
63 LPCSTR Name;
64 UINT Annotations;
65 } D3DXFUNCTION_DESC;
67 typedef struct ID3DXEffectPool *LPD3DXEFFECTPOOL;
69 DEFINE_GUID(IID_ID3DXEffectPool, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
71 #undef INTERFACE
72 #define INTERFACE ID3DXEffectPool
74 DECLARE_INTERFACE_(ID3DXEffectPool, IUnknown)
76 /*** IUnknown methods ***/
77 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
78 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
79 STDMETHOD_(ULONG, Release)(THIS) PURE;
82 typedef struct ID3DXBaseEffect *LPD3DXBASEEFFECT;
84 DEFINE_GUID(IID_ID3DXBaseEffect, 0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe);
86 #undef INTERFACE
87 #define INTERFACE ID3DXBaseEffect
89 DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown)
91 /*** IUnknown methods ***/
92 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
93 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
94 STDMETHOD_(ULONG, Release)(THIS) PURE;
95 /*** ID3DXBaseEffect methods ***/
96 STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
97 STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
98 STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
99 STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
100 STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
101 STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
102 STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE;
103 STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE;
104 STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
105 STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
106 STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
107 STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
108 STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE;
109 STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
110 STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name);
111 STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
112 STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE;
113 STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE;
114 STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE;
115 STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
116 STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
117 STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, CONST BOOL* b, UINT count) PURE;
118 STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
119 STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
120 STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
121 STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, CONST INT* n, UINT count) PURE;
122 STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
123 STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
124 STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
125 STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, CONST FLOAT* f, UINT count) PURE;
126 STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
127 STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector) PURE;
128 STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
129 STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector, UINT count) PURE;
130 STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
131 STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE;
132 STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
133 STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE;
134 STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
135 STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
136 STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
137 STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE;
138 STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
139 STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE;
140 STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
141 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
142 STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
143 STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE;
144 STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE;
145 STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9 texture) PURE;
146 STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9* texture) PURE;
147 STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DPIXELSHADER9* pshader) PURE;
148 STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DVERTEXSHADER9* vshader) PURE;
149 STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
152 typedef struct ID3DXEffectStateManager *LPD3DXEFFECTSTATEMANAGER;
154 DEFINE_GUID(IID_ID3DXEffectStateManager, 0x79aab587, 0x6dbc, 0x4fa7, 0x82, 0xde, 0x37, 0xfa, 0x17, 0x81, 0xc5, 0xce);
156 #undef INTERFACE
157 #define INTERFACE ID3DXEffectStateManager
159 DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown)
161 /*** IUnknown methods ***/
162 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
163 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
164 STDMETHOD_(ULONG, Release)(THIS) PURE;
165 /*** ID3DXEffectStateManager methods ***/
166 STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, CONST D3DMATRIX* matrix) PURE;
167 STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9* material) PURE;
168 STDMETHOD(SetLight)(THIS_ DWORD index, CONST D3DLIGHT9* light) PURE;
169 STDMETHOD(LightEnable)(THIS_ DWORD index, BOOL enable) PURE;
170 STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE state, DWORD value) PURE;
171 STDMETHOD(SetTexture)(THIS_ DWORD stage, LPDIRECT3DBASETEXTURE9 texture) PURE;
172 STDMETHOD(SetTextureStageState)(THIS_ DWORD stage, D3DTEXTURESTAGESTATETYPE type, DWORD value) PURE;
173 STDMETHOD(SetSamplerState)(THIS_ DWORD sampler, D3DSAMPLERSTATETYPE type, DWORD value) PURE;
174 STDMETHOD(SetNPatchMode)(THIS_ FLOAT num_segments) PURE;
175 STDMETHOD(SetFVF)(THIS_ DWORD format) PURE;
176 STDMETHOD(SetVertexShader)(THIS_ LPDIRECT3DVERTEXSHADER9 shader) PURE;
177 STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT register_index, CONST FLOAT* constant_data, UINT register_count) PURE;
178 STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT register_index, CONST INT* constant_data, UINT register_count) PURE;
179 STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT register_index, CONST BOOL* constant_data, UINT register_count) PURE;
180 STDMETHOD(SetPixelShader)(THIS_ LPDIRECT3DPIXELSHADER9 shader) PURE;
181 STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT register_index, CONST FLOAT* constant_data, UINT register_count) PURE;
182 STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT register_index, CONST INT * constant_data, UINT register_count) PURE;
183 STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT register_index, CONST BOOL* constant_data, UINT register_count) PURE;
186 typedef struct ID3DXEffect *LPD3DXEFFECT;
188 DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5);
190 #undef INTERFACE
191 #define INTERFACE ID3DXEffect
193 DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
195 /*** IUnknown methods ***/
196 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
197 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
198 STDMETHOD_(ULONG, Release)(THIS) PURE;
199 /*** ID3DXBaseEffect methods ***/
200 STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
201 STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
202 STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
203 STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
204 STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
205 STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
206 STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE;
207 STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE;
208 STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
209 STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
210 STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
211 STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
212 STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE;
213 STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
214 STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name);
215 STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
216 STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE;
217 STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE;
218 STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE;
219 STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
220 STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
221 STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, CONST BOOL* b, UINT count) PURE;
222 STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
223 STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
224 STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
225 STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, CONST INT* n, UINT count) PURE;
226 STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
227 STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
228 STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
229 STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, CONST FLOAT* f, UINT count) PURE;
230 STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
231 STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector) PURE;
232 STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
233 STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector, UINT count) PURE;
234 STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
235 STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE;
236 STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
237 STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE;
238 STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
239 STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
240 STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
241 STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE;
242 STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
243 STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE;
244 STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
245 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
246 STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
247 STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE;
248 STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE;
249 STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9 texture) PURE;
250 STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9* texture) PURE;
251 STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DPIXELSHADER9* pshader) PURE;
252 STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DVERTEXSHADER9* vshader) PURE;
253 STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
254 /*** ID3DXEffect methods ***/
255 STDMETHOD(GetPool)(THIS_ LPD3DXEFFECTPOOL* pool) PURE;
256 STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE technique) PURE;
257 STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE;
258 STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE technique) PURE;
259 STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE technique, D3DXHANDLE* next_technique) PURE;
260 STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE parameter, D3DXHANDLE technique) PURE;
261 STDMETHOD(Begin)(THIS_ UINT *passes, DWORD flags) PURE;
262 STDMETHOD(BeginPass)(THIS_ UINT pass) PURE;
263 STDMETHOD(CommitChanges)(THIS) PURE;
264 STDMETHOD(EndPass)(THIS) PURE;
265 STDMETHOD(End)(THIS) PURE;
266 STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
267 STDMETHOD(OnLostDevice)(THIS) PURE;
268 STDMETHOD(OnResetDevice)(THIS) PURE;
269 STDMETHOD(SetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER manager) PURE;
270 STDMETHOD(GetStateManager)(THIS_ LPD3DXEFFECTSTATEMANAGER* manager) PURE;
271 STDMETHOD(BeginParameterBlock)(THIS) PURE;
272 STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE;
273 STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
274 STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
275 STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE9 device, LPD3DXEFFECT* effect) PURE;
276 STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT byte_offset, UINT bytes) PURE;
279 typedef struct ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
281 DEFINE_GUID(IID_ID3DXEffectCompiler, 0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0);
283 #undef INTERFACE
284 #define INTERFACE ID3DXEffectCompiler
286 DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
288 /*** IUnknown methods ***/
289 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
290 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
291 STDMETHOD_(ULONG, Release)(THIS) PURE;
292 /*** ID3DXBaseEffect methods ***/
293 STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
294 STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
295 STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
296 STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
297 STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
298 STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
299 STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, LPCSTR name) PURE;
300 STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, LPCSTR semantic) PURE;
301 STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
302 STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
303 STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ LPCSTR name) PURE;
304 STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
305 STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, LPCSTR name) PURE;
306 STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
307 STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ LPCSTR name);
308 STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
309 STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, LPCSTR name) PURE;
310 STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, LPCVOID data, UINT bytes) PURE;
311 STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, LPVOID data, UINT bytes) PURE;
312 STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
313 STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
314 STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, CONST BOOL* b, UINT count) PURE;
315 STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
316 STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
317 STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
318 STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, CONST INT* n, UINT count) PURE;
319 STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
320 STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
321 STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
322 STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, CONST FLOAT* f, UINT count) PURE;
323 STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
324 STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector) PURE;
325 STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
326 STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, CONST D3DXVECTOR4* vector, UINT count) PURE;
327 STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
328 STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE;
329 STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
330 STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE;
331 STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
332 STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
333 STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
334 STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix) PURE;
335 STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
336 STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX* matrix, UINT count) PURE;
337 STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
338 STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, CONST D3DXMATRIX** matrix, UINT count) PURE;
339 STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
340 STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, LPCSTR string) PURE;
341 STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, LPCSTR* string) PURE;
342 STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9 texture) PURE;
343 STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, LPDIRECT3DBASETEXTURE9* texture) PURE;
344 STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DPIXELSHADER9* pshader) PURE;
345 STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, LPDIRECT3DVERTEXSHADER9* vshader) PURE;
346 STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
347 /*** ID3DXEffectCompiler methods ***/
348 STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE;
349 STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE;
350 STDMETHOD(CompileEffect)(THIS_ DWORD flags, LPD3DXBUFFER* effect, LPD3DXBUFFER* error_msgs) PURE;
351 STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, LPCSTR target, DWORD flags, LPD3DXBUFFER* shader,
352 LPD3DXBUFFER* error_msgs, LPD3DXCONSTANTTABLE* constant_table) PURE;
354 #undef INTERFACE
356 #ifdef __cplusplus
357 extern "C" {
358 #endif
360 HRESULT WINAPI D3DXCreateEffectPool(LPD3DXEFFECTPOOL* pool);
362 HRESULT WINAPI D3DXCreateEffect(LPDIRECT3DDEVICE9 device,
363 LPCVOID srcdata,
364 UINT srcdatalen,
365 CONST D3DXMACRO* defines,
366 LPD3DXINCLUDE include,
367 DWORD flags,
368 LPD3DXEFFECTPOOL pool,
369 LPD3DXEFFECT* effect,
370 LPD3DXBUFFER* compilation_errors);
372 HRESULT WINAPI D3DXCreateEffectEx(LPDIRECT3DDEVICE9 device,
373 LPCVOID srcdata,
374 UINT srcdatalen,
375 CONST D3DXMACRO* defines,
376 LPD3DXINCLUDE include,
377 LPCSTR skip_constants,
378 DWORD flags,
379 LPD3DXEFFECTPOOL pool,
380 LPD3DXEFFECT* effect,
381 LPD3DXBUFFER* compilation_errors);
383 HRESULT WINAPI D3DXCreateEffectCompiler(LPCSTR srcdata,
384 UINT srcdatalen,
385 CONST D3DXMACRO* defines,
386 LPD3DXINCLUDE include,
387 DWORD flags,
388 LPD3DXEFFECTCOMPILER* compiler,
389 LPD3DXBUFFER* parse_errors);
391 HRESULT WINAPI D3DXCreateEffectFromFileExA(LPDIRECT3DDEVICE9 device,
392 LPCSTR srcfile,
393 const D3DXMACRO *defines,
394 LPD3DXINCLUDE include,
395 LPCSTR skipconstants,
396 DWORD flags,
397 LPD3DXEFFECTPOOL pool,
398 LPD3DXEFFECT *effect,
399 LPD3DXBUFFER *compilationerrors);
400 HRESULT WINAPI D3DXCreateEffectFromFileExW(LPDIRECT3DDEVICE9 device,
401 LPCWSTR srcfile,
402 const D3DXMACRO *defines,
403 LPD3DXINCLUDE include,
404 LPCSTR skipconstants,
405 DWORD flags,
406 LPD3DXEFFECTPOOL pool,
407 LPD3DXEFFECT *effect,
408 LPD3DXBUFFER *compilationerrors);
409 #define D3DXCreateEffectFromFileEx WINELIB_NAME_AW(D3DXCreateEffectFromFileEx)
411 HRESULT WINAPI D3DXCreateEffectFromFileA(LPDIRECT3DDEVICE9 device,
412 LPCSTR srcfile,
413 const D3DXMACRO *defines,
414 LPD3DXINCLUDE include,
415 DWORD flags,
416 LPD3DXEFFECTPOOL pool,
417 LPD3DXEFFECT *effect,
418 LPD3DXBUFFER *compilationerrors);
419 HRESULT WINAPI D3DXCreateEffectFromFileW(LPDIRECT3DDEVICE9 device,
420 LPCWSTR srcfile,
421 const D3DXMACRO *defines,
422 LPD3DXINCLUDE include,
423 DWORD flags,
424 LPD3DXEFFECTPOOL pool,
425 LPD3DXEFFECT *effect,
426 LPD3DXBUFFER *compilationerrors);
427 #define D3DXCreateEffectFromFile WINELIB_NAME_AW(D3DXCreateEffectFromFile)
429 HRESULT WINAPI D3DXCreateEffectFromResourceExA(LPDIRECT3DDEVICE9 device,
430 HMODULE srcmodule,
431 LPCSTR srcresource,
432 const D3DXMACRO *defines,
433 LPD3DXINCLUDE include,
434 LPCSTR skipconstants,
435 DWORD flags,
436 LPD3DXEFFECTPOOL pool,
437 LPD3DXEFFECT *effect,
438 LPD3DXBUFFER *compilationerrors);
439 HRESULT WINAPI D3DXCreateEffectFromResourceExW(LPDIRECT3DDEVICE9 device,
440 HMODULE srcmodule,
441 LPCWSTR srcresource,
442 const D3DXMACRO *defines,
443 LPD3DXINCLUDE include,
444 LPCSTR skipconstants,
445 DWORD flags,
446 LPD3DXEFFECTPOOL pool,
447 LPD3DXEFFECT *effect,
448 LPD3DXBUFFER *compilationerrors);
449 #define D3DXCreateEffectFromResourceEx WINELIB_NAME_AW(D3DXCreateEffectFromResourceEx)
451 HRESULT WINAPI D3DXCreateEffectFromResourceA(LPDIRECT3DDEVICE9 device,
452 HMODULE srcmodule,
453 LPCSTR srcresource,
454 const D3DXMACRO *defines,
455 LPD3DXINCLUDE include,
456 DWORD flags,
457 LPD3DXEFFECTPOOL pool,
458 LPD3DXEFFECT *effect,
459 LPD3DXBUFFER *compilationerrors);
460 HRESULT WINAPI D3DXCreateEffectFromResourceW(LPDIRECT3DDEVICE9 device,
461 HMODULE srcmodule,
462 LPCWSTR srcresource,
463 const D3DXMACRO *defines,
464 LPD3DXINCLUDE include,
465 DWORD flags,
466 LPD3DXEFFECTPOOL pool,
467 LPD3DXEFFECT *effect,
468 LPD3DXBUFFER *compilationerrors);
469 #define D3DXCreateEffectFromResource WINELIB_NAME_AW(D3DXCreateEffectFromResource)
471 HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(LPCSTR srcfile,
472 const D3DXMACRO *defines,
473 LPD3DXINCLUDE include,
474 DWORD flags,
475 LPD3DXEFFECTCOMPILER *effectcompiler,
476 LPD3DXBUFFER *parseerrors);
477 HRESULT WINAPI D3DXCreateEffectCompilerFromFileW(LPCWSTR srcfile,
478 const D3DXMACRO *defines,
479 LPD3DXINCLUDE include,
480 DWORD flags,
481 LPD3DXEFFECTCOMPILER *effectcompiler,
482 LPD3DXBUFFER *parseerrors);
483 #define D3DXCreateEffectCompilerFromFile WINELIB_NAME_AW(D3DXCreateEffectCompilerFromFile)
485 HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA(HMODULE srcmodule,
486 LPCSTR srcresource,
487 const D3DXMACRO *defines,
488 LPD3DXINCLUDE include,
489 DWORD flags,
490 LPD3DXEFFECTCOMPILER *effectcompiler,
491 LPD3DXBUFFER *parseerrors);
492 HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule,
493 LPCWSTR srcresource,
494 const D3DXMACRO *defines,
495 LPD3DXINCLUDE include,
496 DWORD flags,
497 LPD3DXEFFECTCOMPILER *effectcompiler,
498 LPD3DXBUFFER *parseerrors);
499 #define D3DXCreateEffectCompilerFromResource WINELIB_NAME_AW(D3DXCreateEffectCompilerFromResource)
501 #ifdef __cplusplus
503 #endif
505 #endif /* __D3DX9EFFECT_H__ */