mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 16:41:33 +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
1 changed files with 1 additions and 1 deletions
|
@ -2988,7 +2988,7 @@ osg::StateSet* MWShadowTechnique::selectStateSetForRenderingShadow(ViewDependent
|
||||||
|
|
||||||
stateset->setTextureAttributeAndModes(0, _fallbackBaseTexture.get(), osg::StateAttribute::ON);
|
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;
|
OSG_INFO<<"addUniform("<<uniform->getName()<<")"<<std::endl;
|
||||||
stateset->addUniform(uniform);
|
stateset->addUniform(uniform);
|
||||||
|
|
Loading…
Reference in a new issue