source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/d3dx9effect.h@ 1167

Last change on this file since 1167 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

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