1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Don't reallocate light list vector unnecessarily

This commit is contained in:
bzzt 2019-02-20 13:37:00 +00:00 committed by Capostrophic
parent a567111400
commit 8c649f05e6

View File

@ -234,6 +234,7 @@ namespace SceneUtil
{
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet;
std::vector<osg::ref_ptr<osg::Light> > lights;
lights.reserve(lightList.size());
for (unsigned int i=0; i<lightList.size();++i)
{
lights.push_back(lightList[i]->mLightSource->getLight(frameNum));