diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 12 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 20 |
2 files changed, 27 insertions, 5 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ed9bcb0380..425f624180 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13760,6 +13760,18 @@ <real>0.25</real> </map> + <key>PathfindingXRayWireframe</key> + <map> + <key>Comment</key> + <string>Render pathfinding xray as a wireframe.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>PathfindingLineWidth</key> <map> <key>Comment</key> diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index dcc3bbbe22..a02c39e728 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4429,15 +4429,25 @@ void LLPipeline::renderDebug() if (pathfindingConsole->isRenderXRay()) { + gPathfindingProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint")); + gPathfindingProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity")); + LLGLEnable blend(GL_BLEND); + LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER); + + glPolygonOffset(offset, -offset); + + if (gSavedSettings.getBOOL("PathfindingXRayWireframe")) { //draw hidden wireframe as darker and less opaque - glPolygonOffset(offset, -offset); - gPathfindingProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint")); - gPathfindingProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity")); gPathfindingProgram.uniform1f("ambiance", 1.f); - LLGLEnable blend(GL_BLEND); - LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER); llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] ); } + else + { + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + gPathfindingProgram.uniform1f("ambiance", ambiance); + llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] ); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + } } { //draw visible wireframe as brighter, thicker and more opaque |