Sweden-Number/include/d3dx9effect.h

433 lines
26 KiB
C
Raw Normal View History

2010-03-19 11:55:17 +01:00
/*
* Copyright 2010 Christian Costa
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <d3dx9.h>
#ifndef __D3DX9EFFECT_H__
#define __D3DX9EFFECT_H__
2011-06-27 11:58:20 +02:00
#define D3DXFX_DONOTSAVESTATE (1 << 0)
#define D3DXFX_DONOTSAVESHADERSTATE (1 << 1)
#define D3DXFX_DONOTSAVESAMPLERSTATE (1 << 2)
#define D3DXFX_NOT_CLONEABLE (1 << 11)
#define D3DXFX_LARGEADDRESSAWARE (1 << 17)
2011-04-07 11:06:56 +02:00
#define D3DX_PARAMETER_SHARED 1
#define D3DX_PARAMETER_LITERAL 2
#define D3DX_PARAMETER_ANNOTATION 4
2013-09-02 09:45:44 +02:00
typedef struct _D3DXEFFECT_DESC
{
const char *Creator;
2010-03-19 11:55:17 +01:00
UINT Parameters;
UINT Techniques;
UINT Functions;
} D3DXEFFECT_DESC;
2013-09-02 09:45:44 +02:00
typedef struct _D3DXPARAMETER_DESC
{
const char *Name;
const char *Semantic;
2010-03-19 11:55:17 +01:00
D3DXPARAMETER_CLASS Class;
D3DXPARAMETER_TYPE Type;
UINT Rows;
UINT Columns;
UINT Elements;
UINT Annotations;
UINT StructMembers;
DWORD Flags;
UINT Bytes;
} D3DXPARAMETER_DESC;
2013-09-02 09:45:44 +02:00
typedef struct _D3DXTECHNIQUE_DESC
{
const char *Name;
2010-03-19 11:55:17 +01:00
UINT Passes;
UINT Annotations;
} D3DXTECHNIQUE_DESC;
2013-09-02 09:45:44 +02:00
typedef struct _D3DXPASS_DESC
{
const char *Name;
2010-03-19 11:55:17 +01:00
UINT Annotations;
const DWORD *pVertexShaderFunction;
const DWORD *pPixelShaderFunction;
2010-03-19 11:55:17 +01:00
} D3DXPASS_DESC;
2013-09-02 09:45:44 +02:00
typedef struct _D3DXFUNCTION_DESC
{
const char *Name;
2010-03-19 11:55:17 +01:00
UINT Annotations;
} D3DXFUNCTION_DESC;
typedef struct ID3DXEffectPool *LPD3DXEFFECTPOOL;
DEFINE_GUID(IID_ID3DXEffectPool, 0x9537ab04, 0x3250, 0x412e, 0x82, 0x13, 0xfc, 0xd2, 0xf8, 0x67, 0x79, 0x33);
#undef INTERFACE
#define INTERFACE ID3DXEffectPool
DECLARE_INTERFACE_(ID3DXEffectPool, IUnknown)
{
/*** IUnknown methods ***/
2013-09-04 08:56:46 +02:00
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
};
#undef INTERFACE
2010-03-19 11:55:17 +01:00
typedef struct ID3DXBaseEffect *LPD3DXBASEEFFECT;
DEFINE_GUID(IID_ID3DXBaseEffect, 0x17c18ac, 0x103f, 0x4417, 0x8c, 0x51, 0x6b, 0xf6, 0xef, 0x1e, 0x56, 0xbe);
#define INTERFACE ID3DXBaseEffect
DECLARE_INTERFACE_(ID3DXBaseEffect, IUnknown)
{
/*** IUnknown methods ***/
2013-09-04 08:56:46 +02:00
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DXBaseEffect methods ***/
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
2010-03-19 11:55:17 +01:00
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
2013-09-03 09:47:25 +02:00
STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE;
2013-09-04 08:56:46 +02:00
STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
2012-10-25 21:21:37 +02:00
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
2012-10-23 11:23:45 +02:00
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
2012-10-23 21:01:07 +02:00
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
};
#undef INTERFACE
2010-03-19 11:55:17 +01:00
typedef struct ID3DXEffectStateManager *LPD3DXEFFECTSTATEMANAGER;
DEFINE_GUID(IID_ID3DXEffectStateManager, 0x79aab587, 0x6dbc, 0x4fa7, 0x82, 0xde, 0x37, 0xfa, 0x17, 0x81, 0xc5, 0xce);
#define INTERFACE ID3DXEffectStateManager
DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown)
{
/*** IUnknown methods ***/
2013-09-04 08:56:46 +02:00
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DXEffectStateManager methods ***/
STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix) PURE;
STDMETHOD(SetMaterial)(THIS_ const D3DMATERIAL9 *material) PURE;
STDMETHOD(SetLight)(THIS_ DWORD index, const D3DLIGHT9 *light) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(LightEnable)(THIS_ DWORD index, BOOL enable) PURE;
STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE state, DWORD value) PURE;
2012-10-25 21:21:37 +02:00
STDMETHOD(SetTexture)(THIS_ DWORD stage, struct IDirect3DBaseTexture9 *texture) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(SetTextureStageState)(THIS_ DWORD stage, D3DTEXTURESTAGESTATETYPE type, DWORD value) PURE;
STDMETHOD(SetSamplerState)(THIS_ DWORD sampler, D3DSAMPLERSTATETYPE type, DWORD value) PURE;
STDMETHOD(SetNPatchMode)(THIS_ FLOAT num_segments) PURE;
STDMETHOD(SetFVF)(THIS_ DWORD format) PURE;
2012-10-23 21:01:07 +02:00
STDMETHOD(SetVertexShader)(THIS_ struct IDirect3DVertexShader9 *shader) PURE;
STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT register_index, const FLOAT *constant_data, UINT register_count) PURE;
STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT register_index, const INT *constant_data, UINT register_count) PURE;
STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT register_index, const BOOL *constant_data, UINT register_count) PURE;
2012-10-23 11:23:45 +02:00
STDMETHOD(SetPixelShader)(THIS_ struct IDirect3DPixelShader9 *shader) PURE;
STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT register_index, const FLOAT *constant_data, UINT register_count) PURE;
STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT register_index, const INT *constant_data, UINT register_count) PURE;
STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT register_index, const BOOL *constant_data, UINT register_count) PURE;
2010-03-19 11:55:17 +01:00
};
#undef INTERFACE
2010-03-19 11:55:17 +01:00
typedef struct ID3DXEffect *LPD3DXEFFECT;
DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5);
#define INTERFACE ID3DXEffect
DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
{
/*** IUnknown methods ***/
2013-09-04 08:56:46 +02:00
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DXBaseEffect methods ***/
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
2010-03-19 11:55:17 +01:00
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
2013-09-03 09:47:25 +02:00
STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE;
2013-09-04 08:56:46 +02:00
STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
2012-10-25 21:21:37 +02:00
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
2012-10-23 11:23:45 +02:00
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
2012-10-23 21:01:07 +02:00
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
/*** ID3DXEffect methods ***/
2012-11-29 22:44:42 +01:00
STDMETHOD(GetPool)(THIS_ ID3DXEffectPool **pool) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(SetTechnique)(THIS_ D3DXHANDLE technique) PURE;
STDMETHOD_(D3DXHANDLE, GetCurrentTechnique)(THIS) PURE;
STDMETHOD(ValidateTechnique)(THIS_ D3DXHANDLE technique) PURE;
STDMETHOD(FindNextValidTechnique)(THIS_ D3DXHANDLE technique, D3DXHANDLE* next_technique) PURE;
STDMETHOD_(BOOL, IsParameterUsed)(THIS_ D3DXHANDLE parameter, D3DXHANDLE technique) PURE;
STDMETHOD(Begin)(THIS_ UINT *passes, DWORD flags) PURE;
STDMETHOD(BeginPass)(THIS_ UINT pass) PURE;
STDMETHOD(CommitChanges)(THIS) PURE;
STDMETHOD(EndPass)(THIS) PURE;
STDMETHOD(End)(THIS) PURE;
2012-10-28 20:54:52 +01:00
STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(OnLostDevice)(THIS) PURE;
STDMETHOD(OnResetDevice)(THIS) PURE;
2012-11-29 22:44:43 +01:00
STDMETHOD(SetStateManager)(THIS_ ID3DXEffectStateManager *manager) PURE;
STDMETHOD(GetStateManager)(THIS_ ID3DXEffectStateManager **manager) PURE;
2010-03-19 11:55:17 +01:00
STDMETHOD(BeginParameterBlock)(THIS) PURE;
STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE;
STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
2012-10-28 20:54:52 +01:00
STDMETHOD(CloneEffect)(THIS_ struct IDirect3DDevice9 *device, struct ID3DXEffect **effect) PURE;
2013-09-03 09:47:25 +02:00
STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes) PURE;
2010-03-19 11:55:17 +01:00
};
#undef INTERFACE
2010-03-19 11:55:17 +01:00
typedef struct ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
DEFINE_GUID(IID_ID3DXEffectCompiler, 0x51b8a949, 0x1a31, 0x47e6, 0xbe, 0xa0, 0x4b, 0x30, 0xdb, 0x53, 0xf1, 0xe0);
#define INTERFACE ID3DXEffectCompiler
DECLARE_INTERFACE_(ID3DXEffectCompiler, ID3DXBaseEffect)
{
/*** IUnknown methods ***/
2013-09-04 08:56:46 +02:00
STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **out) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
/*** ID3DXBaseEffect methods ***/
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* desc) PURE;
STDMETHOD(GetParameterDesc)(THIS_ D3DXHANDLE parameter, D3DXPARAMETER_DESC* desc) PURE;
STDMETHOD(GetTechniqueDesc)(THIS_ D3DXHANDLE technique, D3DXTECHNIQUE_DESC* desc) PURE;
STDMETHOD(GetPassDesc)(THIS_ D3DXHANDLE pass, D3DXPASS_DESC* desc) PURE;
STDMETHOD(GetFunctionDesc)(THIS_ D3DXHANDLE shader, D3DXFUNCTION_DESC* desc) PURE;
STDMETHOD_(D3DXHANDLE, GetParameter)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetParameterByName)(THIS_ D3DXHANDLE parameter, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterBySemantic)(THIS_ D3DXHANDLE parameter, const char *semantic) PURE;
STDMETHOD_(D3DXHANDLE, GetParameterElement)(THIS_ D3DXHANDLE parameter, UINT index) PURE;
STDMETHOD_(D3DXHANDLE, GetTechnique)(THIS_ UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetTechniqueByName)(THIS_ const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetPass)(THIS_ D3DXHANDLE technique, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetPassByName)(THIS_ D3DXHANDLE technique, const char *name) PURE;
STDMETHOD_(D3DXHANDLE, GetFunction)(THIS_ UINT index);
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetFunctionByName)(THIS_ const char *name);
STDMETHOD_(D3DXHANDLE, GetAnnotation)(THIS_ D3DXHANDLE object, UINT index) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD_(D3DXHANDLE, GetAnnotationByName)(THIS_ D3DXHANDLE object, const char *name) PURE;
2013-09-03 09:47:25 +02:00
STDMETHOD(SetValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT bytes) PURE;
2013-09-04 08:56:46 +02:00
STDMETHOD(GetValue)(THIS_ D3DXHANDLE parameter, void *data, UINT bytes) PURE;
STDMETHOD(SetBool)(THIS_ D3DXHANDLE parameter, BOOL b) PURE;
STDMETHOD(GetBool)(THIS_ D3DXHANDLE parameter, BOOL* b) PURE;
STDMETHOD(SetBoolArray)(THIS_ D3DXHANDLE parameter, const BOOL *b, UINT count) PURE;
STDMETHOD(GetBoolArray)(THIS_ D3DXHANDLE parameter, BOOL* b, UINT count) PURE;
STDMETHOD(SetInt)(THIS_ D3DXHANDLE parameter, INT n) PURE;
STDMETHOD(GetInt)(THIS_ D3DXHANDLE parameter, INT* n) PURE;
STDMETHOD(SetIntArray)(THIS_ D3DXHANDLE parameter, const INT *n, UINT count) PURE;
STDMETHOD(GetIntArray)(THIS_ D3DXHANDLE parameter, INT* n, UINT count) PURE;
STDMETHOD(SetFloat)(THIS_ D3DXHANDLE parameter, FLOAT f) PURE;
STDMETHOD(GetFloat)(THIS_ D3DXHANDLE parameter, FLOAT* f) PURE;
STDMETHOD(SetFloatArray)(THIS_ D3DXHANDLE parameter, const FLOAT *f, UINT count) PURE;
STDMETHOD(GetFloatArray)(THIS_ D3DXHANDLE parameter, FLOAT* f, UINT count) PURE;
STDMETHOD(SetVector)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector) PURE;
STDMETHOD(GetVector)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector) PURE;
STDMETHOD(SetVectorArray)(THIS_ D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) PURE;
STDMETHOD(GetVectorArray)(THIS_ D3DXHANDLE parameter, D3DXVECTOR4* vector, UINT count) PURE;
STDMETHOD(SetMatrix)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
STDMETHOD(GetMatrix)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
STDMETHOD(SetMatrixArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
STDMETHOD(GetMatrixArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
STDMETHOD(GetMatrixPointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
STDMETHOD(SetMatrixTranspose)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix) PURE;
STDMETHOD(GetMatrixTranspose)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix) PURE;
STDMETHOD(SetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) PURE;
STDMETHOD(GetMatrixTransposeArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX* matrix, UINT count) PURE;
STDMETHOD(SetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) PURE;
STDMETHOD(GetMatrixTransposePointerArray)(THIS_ D3DXHANDLE parameter, D3DXMATRIX** matrix, UINT count) PURE;
2013-09-02 09:45:44 +02:00
STDMETHOD(SetString)(THIS_ D3DXHANDLE parameter, const char *string) PURE;
STDMETHOD(GetString)(THIS_ D3DXHANDLE parameter, const char **string) PURE;
2012-10-25 21:21:37 +02:00
STDMETHOD(SetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) PURE;
STDMETHOD(GetTexture)(THIS_ D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) PURE;
2012-10-23 11:23:45 +02:00
STDMETHOD(GetPixelShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) PURE;
2012-10-23 21:01:07 +02:00
STDMETHOD(GetVertexShader)(THIS_ D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) PURE;
STDMETHOD(SetArrayRange)(THIS_ D3DXHANDLE parameter, UINT start, UINT end) PURE;
/*** ID3DXEffectCompiler methods ***/
STDMETHOD(SetLiteral)(THIS_ D3DXHANDLE parameter, BOOL literal) PURE;
STDMETHOD(GetLiteral)(THIS_ D3DXHANDLE parameter, BOOL* literal) PURE;
2012-12-02 18:53:17 +01:00
STDMETHOD(CompileEffect)(THIS_ DWORD flags, ID3DXBuffer **effect, ID3DXBuffer **error_msgs) PURE;
2012-11-22 21:13:36 +01:00
STDMETHOD(CompileShader)(THIS_ D3DXHANDLE function, const char *target, DWORD flags,
ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table) PURE;
};
#undef INTERFACE
2010-03-19 11:55:17 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2012-11-29 22:44:42 +01:00
HRESULT WINAPI D3DXCreateEffectPool(ID3DXEffectPool **pool);
2012-10-28 20:54:52 +01:00
HRESULT WINAPI D3DXCreateEffect(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
2012-11-24 17:17:05 +01:00
HRESULT WINAPI D3DXCreateEffectCompiler(const char *srcdata, UINT srcdatalen, const D3DXMACRO *defines,
ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **parse_errors);
2012-10-28 20:54:52 +01:00
HRESULT WINAPI D3DXCreateEffectFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile,
const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
HRESULT WINAPI D3DXCreateEffectFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
#define D3DXCreateEffectFromFileEx WINELIB_NAME_AW(D3DXCreateEffectFromFileEx)
2012-10-28 20:54:52 +01:00
HRESULT WINAPI D3DXCreateEffectFromFileA(struct IDirect3DDevice9 *device, const char *srcfile,
const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
HRESULT WINAPI D3DXCreateEffectFromFileW(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
#define D3DXCreateEffectFromFile WINELIB_NAME_AW(D3DXCreateEffectFromFile)
2012-10-28 20:54:52 +01:00
HRESULT WINAPI D3DXCreateEffectFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include,
const char *skip_constants, DWORD flags, struct ID3DXEffectPool *pool,
struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
HRESULT WINAPI D3DXCreateEffectFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include,
const char *skip_constants, DWORD flags, struct ID3DXEffectPool *pool,
struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
#define D3DXCreateEffectFromResourceEx WINELIB_NAME_AW(D3DXCreateEffectFromResourceEx)
2012-10-28 20:54:52 +01:00
HRESULT WINAPI D3DXCreateEffectFromResourceA(struct IDirect3DDevice9 *device, HMODULE srcmodule,
const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
HRESULT WINAPI D3DXCreateEffectFromResourceW(struct IDirect3DDevice9 *device, HMODULE srcmodule,
const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors);
#define D3DXCreateEffectFromResource WINELIB_NAME_AW(D3DXCreateEffectFromResource)
2012-11-24 17:17:05 +01:00
HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(const char *srcfile, const D3DXMACRO *defines,
ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
HRESULT WINAPI D3DXCreateEffectCompilerFromFileW(const WCHAR *srcfile, const D3DXMACRO *defines,
ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
#define D3DXCreateEffectCompilerFromFile WINELIB_NAME_AW(D3DXCreateEffectCompilerFromFile)
2012-11-24 17:17:05 +01:00
HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA(HMODULE srcmodule, const char *srcresource,
const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags,
ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule, const WCHAR *srcresource,
const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags,
ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
#define D3DXCreateEffectCompilerFromResource WINELIB_NAME_AW(D3DXCreateEffectCompilerFromResource)
2010-03-19 11:55:17 +01:00
#ifdef __cplusplus
}
#endif
#endif /* __D3DX9EFFECT_H__ */