mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
const osg::ref_ptf reference should be faster than value as constructor and destructor are non-trivial
I played around in GodBolt and got into an argument to determine this. The difference will be immeasurably small, but my curiosity has been satisfied.
This commit is contained in:
parent
707204133d
commit
fd14dad789
@ -2988,7 +2988,7 @@ osg::StateSet* MWShadowTechnique::selectStateSetForRenderingShadow(ViewDependent
|
||||
|
||||
stateset->setTextureAttributeAndModes(0, _fallbackBaseTexture.get(), osg::StateAttribute::ON);
|
||||
|
||||
for(auto uniform : _uniforms[traversalNumber % 2])
|
||||
for(const auto& uniform : _uniforms[traversalNumber % 2])
|
||||
{
|
||||
OSG_INFO<<"addUniform("<<uniform->getName()<<")"<<std::endl;
|
||||
stateset->addUniform(uniform);
|
||||
|
Loading…
Reference in New Issue
Block a user