From 6b64ea6779a6d35bb6c9f94e354f5635ee633366 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 3 Apr 2012 17:05:44 -0500 Subject: Switch x-ray render to non-wirefrmae by default. --- indra/newview/app_settings/settings.xml | 12 ++++++++++++ indra/newview/pipeline.cpp | 20 +++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) (limited to 'indra/newview') 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 @@ 0.25 + PathfindingXRayWireframe + + Comment + Render pathfinding xray as a wireframe. + Persist + 0 + Type + Boolean + Value + 0 + + PathfindingLineWidth Comment 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 -- cgit v1.2.3