📄 fxshader.h
字号:
#ifndef __EFFECT_SHADER_D3D_H___
#define __EFFECT_SHADER_D3D_H___
#include "D3DBase.h"
class CEffectShader
{
protected:
ID3DXEffect* m_pEffect;
public:
CEffectShader()
{
}
//按照名字来设置参数
bool setParamValue(const char* Name , float v );
bool setParamValue(const char* Name , const float* v , int Count, int baseIndex = 0);
bool setParamValue(const char* Name , bool v );
bool setParamValue(const char* Name , const bool* v , int Count, int baseIndex = 0);
bool setParamValue(const char* Name , int v );
bool setParamValue(const char* Name , const int* v , int Count, int baseIndex = 0);
bool setParamValue(const char* Name , const D3DXVECTOR4* vec);
bool setParamValue(const char* Name , const D3DXVECTOR4* vecs, int nVector, int baseIndex = 0);
bool setParamValue(const char* Name , const D3DXMATRIX* mat);
bool setParamValue(const char* Name , const D3DXMATRIX* mats, int nMat, int baseIndex = 0);
bool setParamValueT(const char* Name , const D3DXMATRIX* mat);
bool setParamValueT(const char* Name , const D3DXMATRIX* mats, int nMat, int baseIndex = 0);
bool setTexture(const char* Name , IDirect3DBaseTexture9* pTexture);
//创建删除等操作
bool load(const char* file_name);
bool unload();
bool isLoaded(){return m_pEffect != NULL;}
void bind(){};
void unbind(){};
bool begin(size_t *pPasses, unsigned long Flags);
bool beginPass(size_t Pass);
bool commitChanges();
bool endPass();
bool end();
bool setTechnique(const char * technique);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -