summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp35
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h7
-rw-r--r--indra/newview/llviewerdisplay.cpp4
3 files changed, 43 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index e09bc028ce..862f4d2fda 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -799,3 +799,38 @@ void LLFloaterPathfindingConsole::updatePathTestStatus()
mPathTestingStatus->setText((LLStringExplicit)statusText, styleParams);
}
+
+
+BOOL LLFloaterPathfindingConsole::isRenderAnyShapes() const
+{
+ if ( isRenderWalkables() || isRenderStaticObstacles() ||
+ isRenderMaterialVolumes() || isRenderExclusionVolumes() )
+ {
+ return true;
+ }
+
+ return false;
+}
+
+U32 LLFloaterPathfindingConsole::getRenderShapeFlags()
+{
+ resetShapeRenderFlags();
+
+ if ( isRenderWalkables() )
+ {
+ setShapeRenderFlag( LLPathingLib::LLST_WalkableObjects );
+ }
+ if ( isRenderStaticObstacles() )
+ {
+ setShapeRenderFlag( LLPathingLib::LLST_ObstacleObjects );
+ }
+ if ( isRenderMaterialVolumes() )
+ {
+ setShapeRenderFlag( LLPathingLib::LLST_MaterialPhantoms );
+ }
+ if ( isRenderExclusionVolumes() )
+ {
+ setShapeRenderFlag( LLPathingLib::LLST_ExclusionPhantoms );
+ }
+ return mShapeRenderFlags;
+}
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h
index 3735a94c18..fc135d7dd7 100644
--- a/indra/newview/llfloaterpathfindingconsole.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -95,6 +95,9 @@ public:
BOOL isRenderWorld() const;
void setRenderWorld(BOOL pIsRenderWorld);
+
+ BOOL isRenderAnyShapes() const;
+ U32 getRenderShapeFlags();
ERenderHeatmapType getRenderHeatmapType() const;
void setRenderHeatmapType(ERenderHeatmapType pRenderHeatmapType);
@@ -133,6 +136,8 @@ private:
void generatePath();
void updatePathTestStatus();
+ void resetShapeRenderFlags() { mShapeRenderFlags = 0; }
+ void setShapeRenderFlag( LLPathingLib::LLShapeType type ) { mShapeRenderFlags |= (1<<type); }
LLRootHandle<LLFloaterPathfindingConsole> mSelfHandle;
LLCheckBoxCtrl *mShowNavMeshCheckBox;
@@ -165,7 +170,7 @@ private:
LLPathingLib::PathingPacket mPathData;
bool mHasStartPoint;
bool mHasEndPoint;
-
+ U32 mShapeRenderFlags;
static LLHandle<LLFloaterPathfindingConsole> sInstanceHandle;
};
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 42c04f3fd8..001c23278d 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1015,9 +1015,9 @@ void render_navmesh( bool& allowRenderables, bool& exclusiveNavDraw )
exclusiveNavDraw = true;
}
//physics/exclusion shapes
- if ( pathfindingConsole->isRenderExclusionVolumes() )
+ if ( pathfindingConsole->isRenderAnyShapes() )
{
- llPathingLibInstance->renderNavMeshShapesVBO();
+ llPathingLibInstance->renderNavMeshShapesVBO( pathfindingConsole->getRenderShapeFlags() );
exclusiveNavDraw = true;
}
//User designated path