mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-22 22:41:36 +00:00
Move FindLowestUnusedTexUnitVisitor to unnamed namespace
It's not used anywhere except this translation unit so no need to make the symbol available everywhere else.
This commit is contained in:
parent
5ae878c248
commit
4d6350539c
1 changed files with 19 additions and 19 deletions
|
@ -37,26 +37,26 @@ namespace SceneUtil
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::array<std::string, 32> glowTextureNames = generateGlowTextureNames();
|
const std::array<std::string, 32> glowTextureNames = generateGlowTextureNames();
|
||||||
}
|
|
||||||
|
|
||||||
class FindLowestUnusedTexUnitVisitor : public osg::NodeVisitor
|
struct FindLowestUnusedTexUnitVisitor : public osg::NodeVisitor
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
FindLowestUnusedTexUnitVisitor()
|
FindLowestUnusedTexUnitVisitor()
|
||||||
: osg::NodeVisitor(TRAVERSE_ALL_CHILDREN)
|
: osg::NodeVisitor(TRAVERSE_ALL_CHILDREN)
|
||||||
, mLowestUnusedTexUnit(0)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void apply(osg::Node& node) override
|
void apply(osg::Node& node) override
|
||||||
{
|
{
|
||||||
if (osg::StateSet* stateset = node.getStateSet())
|
if (osg::StateSet* stateset = node.getStateSet())
|
||||||
mLowestUnusedTexUnit = std::max(mLowestUnusedTexUnit, int(stateset->getTextureAttributeList().size()));
|
mLowestUnusedTexUnit
|
||||||
|
= std::max(mLowestUnusedTexUnit, int(stateset->getTextureAttributeList().size()));
|
||||||
|
|
||||||
traverse(node);
|
traverse(node);
|
||||||
}
|
}
|
||||||
int mLowestUnusedTexUnit;
|
|
||||||
|
int mLowestUnusedTexUnit = 0;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
GlowUpdater::GlowUpdater(int texUnit, const osg::Vec4f& color,
|
GlowUpdater::GlowUpdater(int texUnit, const osg::Vec4f& color,
|
||||||
const std::vector<osg::ref_ptr<osg::Texture2D>>& textures, osg::Node* node, float duration,
|
const std::vector<osg::ref_ptr<osg::Texture2D>>& textures, osg::Node* node, float duration,
|
||||||
|
|
Loading…
Reference in a new issue