changed the scene manager's registered node arrays to use set_used(0) rather than clear() to avoid unnecessary reallocations
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@720 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
61620cebff
commit
cda27017af
|
@ -1039,7 +1039,7 @@ void CSceneManager::drawAll()
|
||||||
for (i=0; i<CameraList.size(); ++i)
|
for (i=0; i<CameraList.size(); ++i)
|
||||||
CameraList[i]->render();
|
CameraList[i]->render();
|
||||||
|
|
||||||
CameraList.clear();
|
CameraList.set_used(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//render lights scenes
|
//render lights scenes
|
||||||
|
@ -1056,7 +1056,7 @@ void CSceneManager::drawAll()
|
||||||
for (i=0; i< maxLights; ++i)
|
for (i=0; i< maxLights; ++i)
|
||||||
LightList[i].node->render();
|
LightList[i].node->render();
|
||||||
|
|
||||||
LightList.clear();
|
LightList.set_used(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// render skyboxes
|
// render skyboxes
|
||||||
|
@ -1066,7 +1066,7 @@ void CSceneManager::drawAll()
|
||||||
for (i=0; i<SkyBoxList.size(); ++i)
|
for (i=0; i<SkyBoxList.size(); ++i)
|
||||||
SkyBoxList[i]->render();
|
SkyBoxList[i]->render();
|
||||||
|
|
||||||
SkyBoxList.clear();
|
SkyBoxList.set_used(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1080,7 +1080,7 @@ void CSceneManager::drawAll()
|
||||||
|
|
||||||
Parameters.setAttribute ( "drawn", (s32) SolidNodeList.size () );
|
Parameters.setAttribute ( "drawn", (s32) SolidNodeList.size () );
|
||||||
|
|
||||||
SolidNodeList.clear();
|
SolidNodeList.set_used(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// render shadows
|
// render shadows
|
||||||
|
@ -1093,7 +1093,7 @@ void CSceneManager::drawAll()
|
||||||
Driver->drawStencilShadow(true,ShadowColor, ShadowColor,
|
Driver->drawStencilShadow(true,ShadowColor, ShadowColor,
|
||||||
ShadowColor, ShadowColor);
|
ShadowColor, ShadowColor);
|
||||||
|
|
||||||
ShadowNodeList.clear();
|
ShadowNodeList.set_used(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// render transparent objects.
|
// render transparent objects.
|
||||||
|
@ -1104,7 +1104,7 @@ void CSceneManager::drawAll()
|
||||||
for (i=0; i<TransparentNodeList.size(); ++i)
|
for (i=0; i<TransparentNodeList.size(); ++i)
|
||||||
TransparentNodeList[i].node->render();
|
TransparentNodeList[i].node->render();
|
||||||
|
|
||||||
TransparentNodeList.clear();
|
TransparentNodeList.set_used(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// render shader objects.
|
// render shader objects.
|
||||||
|
@ -1121,7 +1121,7 @@ void CSceneManager::drawAll()
|
||||||
for (i=0; i< size; ++i)
|
for (i=0; i< size; ++i)
|
||||||
ShaderNodeList[g][i].node->render();
|
ShaderNodeList[g][i].node->render();
|
||||||
|
|
||||||
ShaderNodeList[g].clear();
|
ShaderNodeList[g].set_used(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue