Add IMaterialRendererServices::startUseProgram/stopUseProgram
This makes it possible to set high-level shader constants (which are attached to shader programs) to be set outside of OnSetConstants. IShaderConstantSetCallBack::OnCreate has it set automatically now so it works the same as OnSetConstants. D3D9 and burnings both work different, so there hadn't been a problem with those. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6469 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@@ -3727,7 +3727,9 @@ s32 COpenGLDriver::addShaderMaterial(const c8* vertexShaderProgram,
|
||||
r->drop();
|
||||
|
||||
if (callback && nr >= 0)
|
||||
{
|
||||
callback->OnCreate(this, userData);
|
||||
}
|
||||
|
||||
return nr;
|
||||
}
|
||||
@@ -3764,7 +3766,11 @@ s32 COpenGLDriver::addHighLevelShaderMaterial(
|
||||
r->drop();
|
||||
|
||||
if (callback && nr >= 0)
|
||||
{
|
||||
r->startUseProgram();
|
||||
callback->OnCreate(r, userData);
|
||||
r->stopUseProgram();
|
||||
}
|
||||
|
||||
return nr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user