From 14225a42c642a947153a111ab81fa3817cc54534 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 7 Mar 2017 17:25:23 +0100 Subject: [PATCH] Remove unused pointer to IncrementalCompileOperation --- apps/opencs/view/render/cell.cpp | 2 +- apps/openmw/mwrender/objects.hpp | 5 ----- apps/openmw/mwrender/renderingmanager.cpp | 7 +++---- components/terrain/terraingrid.cpp | 4 ++-- components/terrain/terraingrid.hpp | 2 +- components/terrain/world.cpp | 6 +----- components/terrain/world.hpp | 11 ++--------- 7 files changed, 10 insertions(+), 27 deletions(-) diff --git a/apps/opencs/view/render/cell.cpp b/apps/opencs/view/render/cell.cpp index 5474d300b..7cf542835 100644 --- a/apps/opencs/view/render/cell.cpp +++ b/apps/opencs/view/render/cell.cpp @@ -107,7 +107,7 @@ CSVRender::Cell::Cell (CSMWorld::Data& data, osg::Group* rootNode, const std::st if (esmLand.getLandData (ESM::Land::DATA_VHGT)) { - mTerrain.reset(new Terrain::TerrainGrid(mCellNode, mCellNode, data.getResourceSystem().get(), NULL, new TerrainStorage(mData), Mask_Terrain)); + mTerrain.reset(new Terrain::TerrainGrid(mCellNode, mCellNode, data.getResourceSystem().get(), new TerrainStorage(mData), Mask_Terrain)); mTerrain->loadCell(esmLand.mX, esmLand.mY); diff --git a/apps/openmw/mwrender/objects.hpp b/apps/openmw/mwrender/objects.hpp index cc66ae20d..8864e4483 100644 --- a/apps/openmw/mwrender/objects.hpp +++ b/apps/openmw/mwrender/objects.hpp @@ -15,11 +15,6 @@ namespace osg class Group; } -namespace osgUtil -{ - class IncrementalCompileOperation; -} - namespace Resource { class ResourceSystem; diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index db5b77266..ff7f6ae9a 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -215,10 +215,9 @@ namespace MWRender mTerrainStorage = new TerrainStorage(mResourceSystem, Settings::Manager::getString("normal map pattern", "Shaders"), Settings::Manager::getString("normal height map pattern", "Shaders"), - Settings::Manager::getBool("auto use terrain normal maps", "Shaders"), - Settings::Manager::getString("terrain specular map pattern", "Shaders"), Settings::Manager::getBool("auto use terrain specular maps", "Shaders")); - mTerrain.reset(new Terrain::TerrainGrid(sceneRoot, mRootNode, mResourceSystem, mViewer->getIncrementalCompileOperation(), - mTerrainStorage, Mask_Terrain, Mask_PreCompile)); + Settings::Manager::getBool("auto use terrain normal maps", "Shaders"), Settings::Manager::getString("terrain specular map pattern", "Shaders"), + Settings::Manager::getBool("auto use terrain specular maps", "Shaders")); + mTerrain.reset(new Terrain::TerrainGrid(sceneRoot, mRootNode, mResourceSystem, mTerrainStorage, Mask_Terrain, Mask_PreCompile)); mCamera.reset(new Camera(mViewer->getCamera())); diff --git a/components/terrain/terraingrid.cpp b/components/terrain/terraingrid.cpp index c4e69bab1..f7489fcde 100644 --- a/components/terrain/terraingrid.cpp +++ b/components/terrain/terraingrid.cpp @@ -9,8 +9,8 @@ namespace Terrain { -TerrainGrid::TerrainGrid(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, osgUtil::IncrementalCompileOperation* ico, Storage* storage, int nodeMask, int preCompileMask) - : Terrain::World(parent, compileRoot, resourceSystem, ico, storage, nodeMask, preCompileMask) +TerrainGrid::TerrainGrid(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, int nodeMask, int preCompileMask) + : Terrain::World(parent, compileRoot, resourceSystem, storage, nodeMask, preCompileMask) , mNumSplits(4) { } diff --git a/components/terrain/terraingrid.hpp b/components/terrain/terraingrid.hpp index f481c62e4..2cd5b5d7a 100644 --- a/components/terrain/terraingrid.hpp +++ b/components/terrain/terraingrid.hpp @@ -19,7 +19,7 @@ namespace Terrain class TerrainGrid : public Terrain::World { public: - TerrainGrid(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, osgUtil::IncrementalCompileOperation* ico, Storage* storage, int nodeMask, int preCompileMask=~0); + TerrainGrid(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, int nodeMask, int preCompileMask=~0); ~TerrainGrid(); /// Load a terrain cell and store it in cache for later use. diff --git a/components/terrain/world.cpp b/components/terrain/world.cpp index ac6b5a6aa..3b0a05491 100644 --- a/components/terrain/world.cpp +++ b/components/terrain/world.cpp @@ -3,8 +3,6 @@ #include #include -#include - #include #include "storage.hpp" @@ -15,12 +13,10 @@ namespace Terrain { -World::World(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, osgUtil::IncrementalCompileOperation* ico, - Storage* storage, int nodeMask, int preCompileMask) +World::World(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, int nodeMask, int preCompileMask) : mStorage(storage) , mParent(parent) , mResourceSystem(resourceSystem) - , mIncrementalCompileOperation(ico) { mTerrainRoot = new osg::Group; mTerrainRoot->setNodeMask(nodeMask); diff --git a/components/terrain/world.hpp b/components/terrain/world.hpp index 132d5720b..84941d087 100644 --- a/components/terrain/world.hpp +++ b/components/terrain/world.hpp @@ -15,11 +15,6 @@ namespace osg class Node; } -namespace osgUtil -{ - class IncrementalCompileOperation; -} - namespace Resource { class ResourceSystem; @@ -42,8 +37,8 @@ namespace Terrain /// @note takes ownership of \a storage /// @param storage Storage instance to get terrain data from (heights, normals, colors, textures..) /// @param nodeMask mask for the terrain root - World(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, osgUtil::IncrementalCompileOperation* ico, - Storage* storage, int nodeMask, int preCompileMask); + /// @param preCompileMask mask for pre compiling textures + World(osg::Group* parent, osg::Group* compileRoot, Resource::ResourceSystem* resourceSystem, Storage* storage, int nodeMask, int preCompileMask); virtual ~World(); /// Apply the scene manager's texture filtering settings to all cached textures. @@ -69,8 +64,6 @@ namespace Terrain Resource::ResourceSystem* mResourceSystem; - osg::ref_ptr mIncrementalCompileOperation; - std::auto_ptr mTextureManager; std::auto_ptr mChunkManager; };