diff options
author | Dave Parks <davep@lindenlab.com> | 2012-04-02 18:12:58 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-04-02 18:12:58 -0500 |
commit | 0cce43aefefa2546b83f373ed81f8dbc7a6241d2 (patch) | |
tree | 7c228bd77d7787b5865de61f9dbd754b9dcd83a7 /indra/newview/pipeline.cpp | |
parent | 6e184e33018a5395bfbb2c92812229d115944ab5 (diff) | |
parent | 9ccc2a0fced1a5b1e6bdef34eef07133f7754c72 (diff) |
merge
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 101 |
1 files changed, 52 insertions, 49 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index da3fb3a71a..d46dc242be 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4315,50 +4315,54 @@ void LLPipeline::renderDebug() assertInitialized(); - if (LLGLSLShader::sNoFixedFunction) + bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); + + if (!hud_only ) { - gPathfindingProgram.bind(); - } + if (LLGLSLShader::sNoFixedFunction) + { + gPathfindingProgram.bind(); + } - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gPipeline.disableLights(); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gPipeline.disableLights(); - //Render any navmesh geometry - LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); - if ( llPathingLibInstance != NULL ) - { - LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle(); - if (!pathfindingConsoleHandle.isDead()) + //Render any navmesh geometry + LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); + if ( llPathingLibInstance != NULL ) { - LLFloaterPathfindingConsole *pathfindingConsole = pathfindingConsoleHandle.get(); - //NavMesh - if ( pathfindingConsole->isRenderNavMesh() ) - { + LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle(); + if (!pathfindingConsoleHandle.isDead()) + { + LLFloaterPathfindingConsole *pathfindingConsole = pathfindingConsoleHandle.get(); + //NavMesh + if ( pathfindingConsole->isRenderNavMesh() ) + { gPathfindingProgram.uniform1f("tint", 1.f); - glLineWidth(2.0f); - LLGLEnable cull(GL_CULL_FACE); - LLGLEnable blend(GL_BLEND); - if ( pathfindingConsole->isRenderWorld() ) - { - glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); - } - else - { - const LLColor4 &clearColor = pathfindingConsole->mNavMeshColors.mNavMeshClear; - glClearColor(clearColor.mV[0],clearColor.mV[1],clearColor.mV[2],0); - glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + glLineWidth(2.0f); + LLGLEnable cull(GL_CULL_FACE); + LLGLEnable blend(GL_BLEND); + if ( pathfindingConsole->isRenderWorld() ) + { + glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); + } + else + { + const LLColor4 &clearColor = pathfindingConsole->mNavMeshColors.mNavMeshClear; + glClearColor(clearColor.mV[0],clearColor.mV[1],clearColor.mV[2],0); + glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); + } + int materialIndex = pathfindingConsole->getHeatMapType(); + llPathingLibInstance->renderNavMesh( materialIndex ); glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); + glLineWidth(1.0f); + gGL.flush(); } - int materialIndex = pathfindingConsole->getHeatMapType(); - llPathingLibInstance->renderNavMesh( materialIndex ); - glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); - glLineWidth(1.0f); - gGL.flush(); - } - //physics/exclusion shapes - if ( pathfindingConsole->isRenderAnyShapes() ) - { + //physics/exclusion shapes + if ( pathfindingConsole->isRenderAnyShapes() ) + { gPathfindingProgram.uniform1f("tint", 1.f); gGL.flush(); glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); @@ -4398,19 +4402,20 @@ void LLPipeline::renderDebug() glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); } - } - //User designated path - if ( pathfindingConsole->isRenderPath() ) - { - LLGLEnable blend(GL_BLEND); - llPathingLibInstance->renderPath(); + } + //User designated path + if ( pathfindingConsole->isRenderPath() ) + { + LLGLEnable blend(GL_BLEND); + llPathingLibInstance->renderPath(); + } } } - } - gGL.flush(); - if (LLGLSLShader::sNoFixedFunction) - { - gUIProgram.unbind(); + gGL.flush(); + if (LLGLSLShader::sNoFixedFunction) + { + gUIProgram.unbind(); + } } gGL.color4f(1,1,1,1); @@ -4419,9 +4424,7 @@ void LLPipeline::renderDebug() gGL.loadMatrix(gGLModelView); gGL.setColorMask(true, false); - bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); - if (!hud_only && !mDebugBlips.empty()) { //render debug blips if (LLGLSLShader::sNoFixedFunction) |