1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-25 01:41:33 +00:00

Merge branch 'hide_internal_symbols' into 'master'

Move FindLowestUnusedTexUnitVisitor to unnamed namespace

See merge request OpenMW/openmw!3780
This commit is contained in:
Evil Eye 2024-01-17 19:21:52 +00:00
commit f5b4287c79

View file

@ -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,