mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-10 04:26:50 +03:00
comply by elsid review
Signed-off-by: Bret Curtis <psi29a@gmail.com>
This commit is contained in:
parent
ce505a9bb3
commit
cf439581e1
5 changed files with 16 additions and 12 deletions
|
@ -717,8 +717,14 @@ namespace Resource
|
|||
if (mIncrementalCompileOperation)
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*mIncrementalCompileOperation->getToCompiledMutex());
|
||||
while (mIncrementalCompileOperation->getToCompile().size() > 1000)
|
||||
mIncrementalCompileOperation->getToCompile().pop_front();
|
||||
osgUtil::IncrementalCompileOperation::CompileSets& sets = mIncrementalCompileOperation->getToCompile();
|
||||
for(osgUtil::IncrementalCompileOperation::CompileSets::iterator it = sets.begin(); it != sets.end();)
|
||||
{
|
||||
if ((*it)->_subgraphToCompile->referenceCount() <= 2)
|
||||
it = sets.erase(it);
|
||||
else
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,8 +50,6 @@ namespace Terrain
|
|||
|
||||
void releaseGLObjects(osg::State* state) override;
|
||||
|
||||
virtual void setExpiryDelay(double expiryDelay) override { mExpiryDelay = 0.5f; }
|
||||
|
||||
private:
|
||||
osg::ref_ptr<osg::Node> createChunk(float size, const osg::Vec2f& center, unsigned char lod, unsigned int lodFlags, bool compile);
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ void loadRenderingNode(ViewData::Entry& entry, ViewData* vd, int vertexLodMod, f
|
|||
|
||||
if (!entry.mRenderingNode)
|
||||
{
|
||||
auto pat = new SceneUtil::PositionAttitudeTransform;
|
||||
osg::ref_ptr<SceneUtil::PositionAttitudeTransform> pat = new SceneUtil::PositionAttitudeTransform;
|
||||
pat->setPosition(osg::Vec3f(entry.mNode->getCenter().x()*cellWorldSize, entry.mNode->getCenter().y()*cellWorldSize, 0.f));
|
||||
|
||||
const osg::Vec2f& center = entry.mNode->getCenter();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue