@Hybrid
Yes I can overwrite render function in custom scene node, but global usage custom scene nodes isn't the best method... We will need create custom scene node for each avaiable node in Irrlicht, so in my opinion this is not attractive solution for user. What with eg. CAnimatedMeshSceneNode? We don't have acces for derived this class and change only render() function, similat with other nodes, so I think, that callback method is better
@Sudi
This callback isn't usefull for manage effect techniques, because we need loop function for it.
Update:
My first method isn't good, because this is wrong place for callback. We should apply technique callback
in each node render function, so instead:
Code: Select all
driver->setMaterial(Materials[i]);
driver->drawMeshBuffer(mb);
in render function each node, we should add:
Code: Select all
RenderCallback->Execute(Materials[i],mb);
and standard callback will the same as oryginal part, so:
Code: Select all
driver->setMaterial(Materials[i]);
driver->drawMeshBuffer(mb);
but if we apply technique for node it should look like this:
Code: Select all
driver->setMaterial(Materials[i]);
for(int i = 0; i < techniqueCount; i++)
{
setTechnique(Technique[i]);
driver->drawMeshBuffer(mb);
}
What You think about it? We target to more shader rendering structure, instead of fixed pipeline (DX10, OGL3) so manage technique will be very useful for us I think.
Of course I can prepare patch for support this callbacks if You wish.