mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +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:
commit
f5b4287c79
@ -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…
Reference in New Issue
Block a user