summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-12-14 11:13:55 -0500
committerprep <prep@lindenlab.com>2011-12-14 11:13:55 -0500
commitb022048f8710502cb6c099c134fca64bccbc209f (patch)
treee5e6c92d64cb222d9b575a28fd1a812cbc700793 /indra/newview/pipeline.cpp
parent4c60c59610493c5f95776af2ac93ff34f741b427 (diff)
Cleanup
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp54
1 files changed, 30 insertions, 24 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8b51d1cd6c..1db2bb52fb 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3618,7 +3618,36 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
}
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:ForceVBO");
-
+ //Render navmesh geometry
+ {
+ if ( LLPathingLib::getInstance() )
+ {
+ //prep#
+ glClearColor(0,0,0,0);
+ glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
+ glShadeModel(GL_SMOOTH); // Enable Smooth Shading
+ glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background
+ glEnable(GL_DEPTH_TEST); // Enables Depth Testing
+ glDepthFunc(GL_LEQUAL);
+ GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f };
+ glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient);
+
+ bool exclusiveDraw = false;
+ if ( LLPathingLib::getInstance()->getRenderNavMeshState() )
+ {
+ LLPathingLib::getInstance()->renderNavMesh();
+ exclusiveDraw = true;
+ }
+ if ( LLPathingLib::getInstance()->getRenderShapeState() )
+ {
+ LLPathingLib::getInstance()->renderNavMeshShapesVBO();
+ exclusiveDraw = true;
+ }
+
+ if ( exclusiveDraw ) { return; }
+ }
+ }
+
// Initialize lots of GL state to "safe" values
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
@@ -3644,29 +3673,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sDefaultImagep);
LLViewerFetchedTexture::sDefaultImagep->setAddressMode(LLTexUnit::TAM_WRAP);
-
- {
-
- if ( LLPathingLib::getInstance() )
- {
- //prep#
- enableLightsFullbright(LLColor4(1,1,1,1));
-
- bool exclusiveDraw = false;
- if ( LLPathingLib::getInstance()->getRenderNavMeshState() )
- {
- LLPathingLib::getInstance()->renderNavMesh();
- exclusiveDraw = true;
- }
- if ( LLPathingLib::getInstance()->getRenderShapeState() )
- {
- LLPathingLib::getInstance()->renderNavMeshShapesVBO();
- exclusiveDraw = true;
- }
-
- if ( exclusiveDraw ) { return; }
- }
- }
//////////////////////////////////////////////
//