1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-19 08:41:35 +00:00

Move symbols not defined in header to unnamed namespace

This commit is contained in:
elsid 2024-05-05 12:57:04 +02:00
parent 05815b3952
commit 524af5b723
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -40,7 +40,8 @@
namespace MWRender
{
namespace
{
bool typeFilter(int type, bool far)
{
switch (type)
@ -73,6 +74,7 @@ namespace MWRender
return {};
}
}
}
osg::ref_ptr<osg::Node> ObjectPaging::getChunk(float size, const osg::Vec2f& center, unsigned char lod,
unsigned int lodFlags, bool activeGrid, const osg::Vec3f& viewPoint, bool compile)
@ -94,6 +96,8 @@ namespace MWRender
}
}
namespace
{
class CanOptimizeCallback : public SceneUtil::Optimizer::IsOperationPermissibleForObjectCallback
{
public:
@ -109,8 +113,6 @@ namespace MWRender
}
};
namespace
{
using LODRange = osg::LOD::MinMaxPair;
LODRange intersection(const LODRange& left, const LODRange& right)
@ -127,7 +129,6 @@ namespace MWRender
{
return { r.first / div, r.second / div };
}
}
class CopyOp : public osg::CopyOp
{
@ -419,8 +420,9 @@ namespace MWRender
m->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4f(0.1f, 0.1f, 0.1f, 1.f));
m->setColorMode(osg::Material::OFF);
m->setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4f(color));
osg::ref_ptr<osg::StateSet> stateset
= node.getStateSet() ? osg::clone(node.getStateSet(), osg::CopyOp::SHALLOW_COPY) : new osg::StateSet;
osg::ref_ptr<osg::StateSet> stateset = node.getStateSet()
? osg::clone(node.getStateSet(), osg::CopyOp::SHALLOW_COPY)
: new osg::StateSet;
stateset->setAttribute(m);
stateset->addUniform(new osg::Uniform("colorMode", 0));
stateset->addUniform(new osg::Uniform("emissiveMult", 1.f));
@ -447,6 +449,7 @@ namespace MWRender
node.getOrCreateUserDataContainer()->addUserObject(marker);
}
};
}
ObjectPaging::ObjectPaging(Resource::SceneManager* sceneManager, ESM::RefId worldspace)
: GenericResourceManager<ChunkId>(nullptr, Settings::cells().mCacheExpiryDelay)
@ -984,6 +987,8 @@ namespace MWRender
return true;
}
namespace
{
struct GetRefnumsFunctor
{
GetRefnumsFunctor(std::vector<ESM::RefNum>& output)
@ -1012,6 +1017,7 @@ namespace MWRender
osg::Vec4i mActiveGrid;
std::vector<ESM::RefNum>& mOutput;
};
}
void ObjectPaging::getPagedRefnums(const osg::Vec4i& activeGrid, std::vector<ESM::RefNum>& out)
{