diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-03-07 10:19:16 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-07 10:19:16 -0800 |
commit | 94dbe51a5c6fa09989f9e71ee8d84a7207b8acc5 (patch) | |
tree | ad129da68df6ed23ab4359287e1fbeb21a8464f8 /indra/newview/pipeline.cpp | |
parent | a0c626fe411336871505c2c414143ae4b2f73259 (diff) | |
parent | e02d8cdc9875c14084447a5156799eeca030ea73 (diff) |
Pull and merge from ssh://hg@bitbucket.org/stinson_linden/viewer-development-havokai.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 70cf09caca..87e21c1f05 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -105,6 +105,7 @@ #include "llcurl.h" #include "llnotifications.h" #include "LLPathingLib.h" +#include "llfloaterpathfindingconsole.h" #ifdef _DEBUG // Debug indices is disabled for now for debug performance - djs 4/24/02 @@ -4327,6 +4328,55 @@ void LLPipeline::renderDebug() LLMemType mt(LLMemType::MTYPE_PIPELINE); assertInitialized(); + if (LLGLSLShader::sNoFixedFunction) + { + gUIProgram.bind(); + }
+ //Render any navmesh geometry
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if ( llPathingLibInstance != NULL )
+ {
+ LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle();
+ if (!pathfindingConsoleHandle.isDead())
+ {
+ LLFloaterPathfindingConsole *pathfindingConsole = pathfindingConsoleHandle.get();
+ //NavMesh
+ if ( pathfindingConsole->isRenderNavMesh() )
+ {
+ glLineWidth(1.5f);
+ LLGLEnable cull(GL_CULL_FACE);
+ if ( pathfindingConsole->isRenderWorld() )
+ {
+ glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
+ }
+ else
+ {
+ glClearColor(0,0,0,0);
+ glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+ glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+ }
+ llPathingLibInstance->renderNavMesh();
+ glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+ glLineWidth(1.0f);
+ gGL.flush();
+ }
+ //physics/exclusion shapes
+ if ( pathfindingConsole->isRenderAnyShapes() )
+ {
+ llPathingLibInstance->renderNavMeshShapesVBO( pathfindingConsole->getRenderShapeFlags() );
+ }
+ //User designated path
+ if ( pathfindingConsole->isRenderPath() )
+ {
+ llPathingLibInstance->renderPath();
+ }
+ }
+ }
+ gGL.flush(); + if (LLGLSLShader::sNoFixedFunction) + { + gUIProgram.unbind(); + } gGL.color4f(1,1,1,1); |