From 5044816770cd4762d56cc0c9ad73b1b25f578df7 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 13 Mar 2017 00:15:36 +0100 Subject: [PATCH] Remove unused code --- components/terrain/chunkmanager.cpp | 2 -- components/terrain/material.cpp | 4 +--- components/terrain/material.hpp | 2 +- components/terrain/quadtreenode.cpp | 9 --------- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/components/terrain/chunkmanager.cpp b/components/terrain/chunkmanager.cpp index bdb3b6a5f..85f7e26c9 100644 --- a/components/terrain/chunkmanager.cpp +++ b/components/terrain/chunkmanager.cpp @@ -186,8 +186,6 @@ osg::ref_ptr ChunkManager::createChunk(float chunkSize, const osg::Ve geometry->addPrimitiveSet(mBufferCache.getIndexBuffer(numVerts, lodFlags)); - geometry->getBound(); - bool useCompositeMap = chunkSize >= 1.f; unsigned int numUvSets = useCompositeMap ? 1 : 2; diff --git a/components/terrain/material.cpp b/components/terrain/material.cpp index 5b84da3f7..d35fd39ac 100644 --- a/components/terrain/material.cpp +++ b/components/terrain/material.cpp @@ -59,7 +59,7 @@ namespace Terrain } std::vector > createPasses(bool useShaders, bool forcePerPixelLighting, bool clampLighting, Shader::ShaderManager* shaderManager, const std::vector &layers, - const std::vector > &blendmaps, int blendmapScale, float layerTileSize, bool renderCompositeMap) + const std::vector > &blendmaps, int blendmapScale, float layerTileSize) { std::vector > passes; @@ -104,8 +104,6 @@ namespace Terrain stateset->addUniform(new osg::Uniform("normalMap", texunit)); } - // TODO: fix shader for renderCompositeMap=True - Shader::ShaderManager::DefineMap defineMap; defineMap["forcePPL"] = forcePerPixelLighting ? "1" : "0"; defineMap["clamp"] = clampLighting ? "1" : "0"; diff --git a/components/terrain/material.hpp b/components/terrain/material.hpp index 4e8a222d1..25aa69540 100644 --- a/components/terrain/material.hpp +++ b/components/terrain/material.hpp @@ -28,7 +28,7 @@ namespace Terrain std::vector > createPasses(bool useShaders, bool forcePerPixelLighting, bool clampLighting, Shader::ShaderManager* shaderManager, const std::vector& layers, - const std::vector >& blendmaps, int blendmapScale, float layerTileSize, bool renderCompositeMap=false); + const std::vector >& blendmaps, int blendmapScale, float layerTileSize); } diff --git a/components/terrain/quadtreenode.cpp b/components/terrain/quadtreenode.cpp index 2577ab169..438303c27 100644 --- a/components/terrain/quadtreenode.cpp +++ b/components/terrain/quadtreenode.cpp @@ -99,15 +99,6 @@ void QuadTreeNode::traverse(osg::NodeVisitor &nv) if (!hasValidBounds()) return; - if (nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR) - { - osgUtil::CullVisitor* cv = static_cast(&nv); - - // do another culling test against bounding box as its much more accurate than the bounding sphere. - if (cv->isCulled(mBoundingBox)) - return; - } - if ((mLodCallback && mLodCallback->isSufficientDetail(this, nv.getEyePoint())) || !getNumChildren()) getView(nv)->add(this, true); else