mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 00:39:58 +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
@ -37,27 +37,27 @@ namespace SceneUtil
|
||||
}
|
||||
|
||||
const std::array<std::string, 32> glowTextureNames = generateGlowTextureNames();
|
||||
|
||||
struct FindLowestUnusedTexUnitVisitor : public osg::NodeVisitor
|
||||
{
|
||||
FindLowestUnusedTexUnitVisitor()
|
||||
: osg::NodeVisitor(TRAVERSE_ALL_CHILDREN)
|
||||
{
|
||||
}
|
||||
|
||||
void apply(osg::Node& node) override
|
||||
{
|
||||
if (osg::StateSet* stateset = node.getStateSet())
|
||||
mLowestUnusedTexUnit
|
||||
= std::max(mLowestUnusedTexUnit, int(stateset->getTextureAttributeList().size()));
|
||||
|
||||
traverse(node);
|
||||
}
|
||||
|
||||
int mLowestUnusedTexUnit = 0;
|
||||
};
|
||||
}
|
||||
|
||||
class FindLowestUnusedTexUnitVisitor : public osg::NodeVisitor
|
||||
{
|
||||
public:
|
||||
FindLowestUnusedTexUnitVisitor()
|
||||
: osg::NodeVisitor(TRAVERSE_ALL_CHILDREN)
|
||||
, mLowestUnusedTexUnit(0)
|
||||
{
|
||||
}
|
||||
|
||||
void apply(osg::Node& node) override
|
||||
{
|
||||
if (osg::StateSet* stateset = node.getStateSet())
|
||||
mLowestUnusedTexUnit = std::max(mLowestUnusedTexUnit, int(stateset->getTextureAttributeList().size()));
|
||||
|
||||
traverse(node);
|
||||
}
|
||||
int mLowestUnusedTexUnit;
|
||||
};
|
||||
|
||||
GlowUpdater::GlowUpdater(int texUnit, const osg::Vec4f& color,
|
||||
const std::vector<osg::ref_ptr<osg::Texture2D>>& textures, osg::Node* node, float duration,
|
||||
Resource::ResourceSystem* resourcesystem)
|
||||
|
Loading…
x
Reference in New Issue
Block a user