if ( ActiveCamera )
{
ActiveCamera->render();
camWorldPos = ActiveCamera->getAbsolutePosition();
}
// let all nodes register themselves
OnRegisterSceneNode();
if(LightManager)
LightManager->OnPreRender(LightList);
//render camera scenes
{
CurrentRendertime = ESNRP_CAMERA;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0);
if(LightManager)
LightManager->OnRenderPassPreRender(CurrentRendertime);
for (i=0; i<CameraList.size(); ++i)
CameraList->render();
CameraList.set_used(0);
if(LightManager)
LightManager->OnRenderPassPostRender(CurrentRendertime);
}
code in void CSceneManager::drawAll()
my understanding is that ActiveCamera->render() is excuted twice.am I right ? Is it necessary?
ActiveCamera->render(); excute twice?
If ActiveCamera is an element in CameraList then I would assume that is getting rendered twice for no reason however I am not exactly sure whether:
Interfaces with the ActiveCamera in anyway.
Code: Select all
OnRegisterSceneNode();
if(LightManager)
LightManager->OnPreRender(LightList);
//render camera scenes
{
CurrentRendertime = ESNRP_CAMERA;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0);
if(LightManager)
LightManager->OnRenderPassPreRender(CurrentRendertime);
Programming Blog: http://www.uberwolf.com