From d431a1b522c865e69edfb4f6a8ee543cd0f453e3 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Tue, 2 Jun 2015 19:28:05 +0200 Subject: [PATCH] Remove comment --- libraries/render/src/render/DrawTask.cpp | 54 ++++-------------------- 1 file changed, 8 insertions(+), 46 deletions(-) diff --git a/libraries/render/src/render/DrawTask.cpp b/libraries/render/src/render/DrawTask.cpp index 0066f57350..159f586c31 100755 --- a/libraries/render/src/render/DrawTask.cpp +++ b/libraries/render/src/render/DrawTask.cpp @@ -55,44 +55,6 @@ void DrawSceneTask::run(const SceneContextPointer& sceneContext, const RenderCon Job::~Job() { } -/* -bool LODManager::shouldRenderMesh(float largestDimension, float distanceToCamera) { - const float octreeToMeshRatio = 4.0f; // must be this many times closer to a mesh than a voxel to see it. - float octreeSizeScale = getOctreeSizeScale(); - int boundaryLevelAdjust = getBoundaryLevelAdjust(); - float maxScale = (float)TREE_SCALE; - float visibleDistanceAtMaxScale = boundaryDistanceForRenderLevel(boundaryLevelAdjust, octreeSizeScale) / octreeToMeshRatio; - - if (_shouldRenderTableNeedsRebuilding) { - _shouldRenderTable.clear(); - - float SMALLEST_SCALE_IN_TABLE = 0.001f; // 1mm is plenty small - float scale = maxScale; - float visibleDistanceAtScale = visibleDistanceAtMaxScale; - - while (scale > SMALLEST_SCALE_IN_TABLE) { - scale /= 2.0f; - visibleDistanceAtScale /= 2.0f; - _shouldRenderTable[scale] = visibleDistanceAtScale; - } - _shouldRenderTableNeedsRebuilding = false; - } - - float closestScale = maxScale; - float visibleDistanceAtClosestScale = visibleDistanceAtMaxScale; - QMap::const_iterator lowerBound = _shouldRenderTable.lowerBound(largestDimension); - if (lowerBound != _shouldRenderTable.constEnd()) { - closestScale = lowerBound.key(); - visibleDistanceAtClosestScale = lowerBound.value(); - } - - if (closestScale < largestDimension) { - visibleDistanceAtClosestScale *= 2.0f; - } - - return (distanceToCamera <= visibleDistanceAtClosestScale); -}*/ - void render::cullItems(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ItemIDs& inItems, ItemIDs& outItems) { assert(renderContext->args); assert(renderContext->args->_viewFrustum); @@ -139,16 +101,16 @@ struct ItemBound { ItemBound(float centerDepth, float nearDepth, float farDepth, ItemID id) : _centerDepth(centerDepth), _nearDepth(nearDepth), _farDepth(farDepth), _id(id) {} }; -struct FrontToBackSort { - bool operator() (const ItemBound& left, const ItemBound& right) { - return (left._centerDepth < right._centerDepth); - } +struct FrontToBackSort { + bool operator() (const ItemBound& left, const ItemBound& right) { + return (left._centerDepth < right._centerDepth); + } }; -struct BackToFrontSort { - bool operator() (const ItemBound& left, const ItemBound& right) { - return (left._centerDepth > right._centerDepth); - } +struct BackToFrontSort { + bool operator() (const ItemBound& left, const ItemBound& right) { + return (left._centerDepth > right._centerDepth); + } }; void render::depthSortItems(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, bool frontToBack, const ItemIDs& inItems, ItemIDs& outItems) {