mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 12:45:36 +00:00
Don't reallocate light list vector unnecessarily
This commit is contained in:
parent
a567111400
commit
8c649f05e6
1 changed files with 1 additions and 0 deletions
|
@ -234,6 +234,7 @@ namespace SceneUtil
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet;
|
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet;
|
||||||
std::vector<osg::ref_ptr<osg::Light> > lights;
|
std::vector<osg::ref_ptr<osg::Light> > lights;
|
||||||
|
lights.reserve(lightList.size());
|
||||||
for (unsigned int i=0; i<lightList.size();++i)
|
for (unsigned int i=0; i<lightList.size();++i)
|
||||||
{
|
{
|
||||||
lights.push_back(lightList[i]->mLightSource->getLight(frameNum));
|
lights.push_back(lightList[i]->mLightSource->getLight(frameNum));
|
||||||
|
|
Loading…
Reference in a new issue