forked from Mirrorlandia_minetest/irrlicht
Support startUseProgram in COGLES2MaterialRenderer
Not tested much, but seems to be easier in es2 than in normal OpenGL Probably because it doesn't have to care about switching back to fixed function pipeline git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6478 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
23ebdbe978
commit
e4bb544079
@ -2375,7 +2375,10 @@ COGLES2Driver::~COGLES2Driver()
|
||||
r->drop();
|
||||
|
||||
if (callback && nr >= 0)
|
||||
{
|
||||
r->startUseProgram();
|
||||
callback->OnCreate(r, userData);
|
||||
}
|
||||
|
||||
return nr;
|
||||
}
|
||||
|
@ -348,6 +348,11 @@ void COGLES2MaterialRenderer::setBasicRenderStates(const SMaterial& material,
|
||||
Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
|
||||
}
|
||||
|
||||
void COGLES2MaterialRenderer::startUseProgram()
|
||||
{
|
||||
Driver->getCacheHandler()->setProgram(Program);
|
||||
}
|
||||
|
||||
s32 COGLES2MaterialRenderer::getVertexShaderConstantID(const c8* name)
|
||||
{
|
||||
return getPixelShaderConstantID(name);
|
||||
|
@ -55,6 +55,8 @@ public:
|
||||
|
||||
virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates) IRR_OVERRIDE;
|
||||
|
||||
virtual void startUseProgram() IRR_OVERRIDE;
|
||||
|
||||
virtual s32 getVertexShaderConstantID(const c8* name) IRR_OVERRIDE;
|
||||
virtual s32 getPixelShaderConstantID(const c8* name) IRR_OVERRIDE;
|
||||
virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) IRR_OVERRIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user