- Added missing methods for Cg interface.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4323 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
5a265656cc
commit
f8d77add00
|
@ -195,6 +195,11 @@ bool CCgMaterialRenderer::setVertexShaderConstant(const c8* name, const f32* flo
|
|||
return setPixelShaderConstant(name, floats, count);
|
||||
}
|
||||
|
||||
bool CCgMaterialRenderer::setVertexShaderConstant(const c8* name, const bool* bools, int count)
|
||||
{
|
||||
return setPixelShaderConstant(name, bools, count);
|
||||
}
|
||||
|
||||
bool CCgMaterialRenderer::setVertexShaderConstant(const c8* name, const s32* ints, int count)
|
||||
{
|
||||
return setPixelShaderConstant(name, ints, count);
|
||||
|
@ -239,6 +244,23 @@ bool CCgMaterialRenderer::setPixelShaderConstant(const c8* name, const s32* ints
|
|||
return Status;
|
||||
}
|
||||
|
||||
bool CCgMaterialRenderer::setPixelShaderConstant(const c8* name, const bool* bools, int count)
|
||||
{
|
||||
bool Status = false;
|
||||
|
||||
for(unsigned int i = 0; i < UniformInfo.size(); ++i)
|
||||
{
|
||||
if(UniformInfo[i]->getName() == name)
|
||||
{
|
||||
UniformInfo[i]->update(bools, Material);
|
||||
|
||||
Status = true;
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
void CCgMaterialRenderer::getUniformList()
|
||||
{
|
||||
for(unsigned int i = 0; i < UniformInfo.size(); ++i)
|
||||
|
|
|
@ -140,9 +140,11 @@ public:
|
|||
|
||||
virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates) = 0;
|
||||
virtual bool setVertexShaderConstant(const c8* name, const f32* floats, int count);
|
||||
virtual bool setVertexShaderConstant(const c8* name, const bool* bools, int count);
|
||||
virtual bool setVertexShaderConstant(const c8* name, const s32* ints, int count);
|
||||
virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1);
|
||||
virtual bool setPixelShaderConstant(const c8* name, const f32* floats, int count);
|
||||
virtual bool setPixelShaderConstant(const c8* name, const bool* bools, int count);
|
||||
virtual bool setPixelShaderConstant(const c8* name, const s32* ints, int count);
|
||||
virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1);
|
||||
virtual IVideoDriver* getVideoDriver() = 0;
|
||||
|
|
Loading…
Reference in New Issue