réplica de
https://github.com/minetest/irrlicht.git
synced 2025-09-18 14:20:43 +02:00
Add IShaderConstantSetCallBack::OnCreate to allow earlier access to IMaterialRendererServices
Accessing IMaterialRendererServices outside of OnSetConstants can be useful and Irrlicht made this a bit too hard to access. Also OnCreate allows actually for nicer code where initialization and update of shader constants are strictly separated (see changed example). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6465 dfc29bdd-3216-0410-991c-e03cc46cb475
Este commit está contenido en:
@@ -3176,6 +3176,10 @@ s32 CD3D9Driver::addShaderMaterial(const c8* vertexShaderProgram,
|
||||
callback, getMaterialRenderer(baseMaterial), userData);
|
||||
|
||||
r->drop();
|
||||
|
||||
if (callback && nr >= 0)
|
||||
callback->OnCreate(this, userData);
|
||||
|
||||
return nr;
|
||||
}
|
||||
|
||||
@@ -3213,6 +3217,9 @@ s32 CD3D9Driver::addHighLevelShaderMaterial(
|
||||
|
||||
r->drop();
|
||||
|
||||
if (callback && nr >= 0)
|
||||
callback->OnCreate(r, userData);
|
||||
|
||||
return nr;
|
||||
}
|
||||
|
||||
|
Referencia en una nueva incidencia
Block a user