summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerdisplay.cpp')
-rw-r--r--indra/newview/llviewerdisplay.cpp105
1 files changed, 36 insertions, 69 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 001c23278d..95cbb9ba4c 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -113,7 +113,6 @@ void render_hud_attachments();
void render_ui_3d();
void render_ui_2d();
void render_disconnected_background();
-void render_navmesh( bool& allowRenderables, bool& exclusiveNavDraw );
void display_startup()
{
@@ -720,6 +719,13 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gPipeline.generateWaterReflection(*LLViewerCamera::getInstance());
gPipeline.generateHighlight(*LLViewerCamera::getInstance());
gPipeline.renderPhysicsDisplay();
+ LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle();
+ LLFloaterPathfindingConsole *pathfindingConsole = pathfindingConsoleHandle.get();
+ if ( pathfindingConsole->getHeartBeat() )
+ {
+ gPipeline.renderNavMesh();
+ }
+
}
LLGLState::checkStates();
@@ -860,6 +866,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
stop_glerror();
+
if (to_texture)
{
gGL.setColorMask(true, true);
@@ -884,37 +891,33 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gGL.setColorMask(true, false);
}
- LLAppViewer::instance()->pingMainloopTimeout("Display:RenderGeom");
- bool exclusiveNavDraw = false;
- bool allowRenderables = false;
- if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot())
- && !gRestoreGL)
- {
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
- LLMemType mt_rg(LLMemType::MTYPE_DISPLAY_RENDER_GEOM);
- gGL.setColorMask(true, false);
- if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
- {
- gPipeline.renderGeomDeferred(*LLViewerCamera::getInstance());
- }
-
- render_navmesh( allowRenderables, exclusiveNavDraw );
-
- if ( !exclusiveNavDraw || allowRenderables )
- {
- gPipeline.renderGeom(*LLViewerCamera::getInstance(), TRUE);
- }
-
- gGL.setColorMask(true, true);
-
- //store this frame's modelview matrix for use
- //when rendering next frame's occlusion queries
- for (U32 i = 0; i < 16; i++)
- {
- gGLLastModelView[i] = gGLModelView[i];
- gGLLastProjection[i] = gGLProjection[i];
- }
- stop_glerror();
+ if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot())
+ && !gRestoreGL)
+ {
+ LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
+ LLMemType mt_rg(LLMemType::MTYPE_DISPLAY_RENDER_GEOM);
+ gGL.setColorMask(true, false);
+
+
+ if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
+ {
+ gPipeline.renderGeomDeferred(*LLViewerCamera::getInstance());
+ }
+ else
+ {
+ gPipeline.renderGeom(*LLViewerCamera::getInstance(), TRUE);
+ }
+
+ gGL.setColorMask(true, true);
+
+ //store this frame's modelview matrix for use
+ //when rendering next frame's occlusion queries
+ for (U32 i = 0; i < 16; i++)
+ {
+ gGLLastModelView[i] = gGLModelView[i];
+ gGLLastProjection[i] = gGLProjection[i];
+ }
+ stop_glerror();
}
for (U32 i = 0; i < gGLManager.mNumTextureImageUnits; i++)
@@ -956,6 +959,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
}
+
if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender )
{
gPipeline.renderDeferredLighting();
@@ -992,42 +996,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:Done");
}
-void render_navmesh( bool& allowRenderables, bool& exclusiveNavDraw )
-{
- //Render any navmesh geometry
- LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
- if ( llPathingLibInstance != NULL )
- {
- LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle();
- if (!pathfindingConsoleHandle.isDead())
- {
- LLFloaterPathfindingConsole *pathfindingConsole = pathfindingConsoleHandle.get();
- //Determine if we can should overlay the navmesh ontop of the scenes typical renderables
- allowRenderables = pathfindingConsole->isRenderWorld();
-
- //NavMesh
- if ( pathfindingConsole->isRenderNavMesh() )
- {
- glClearColor(0,0,0,0);
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- LLGLDisable lighting(GL_LIGHTING);
- llPathingLibInstance->renderNavMesh();
- exclusiveNavDraw = true;
- }
- //physics/exclusion shapes
- if ( pathfindingConsole->isRenderAnyShapes() )
- {
- llPathingLibInstance->renderNavMeshShapesVBO( pathfindingConsole->getRenderShapeFlags() );
- exclusiveNavDraw = true;
- }
- //User designated path
- if ( pathfindingConsole->isRenderPath() )
- {
- llPathingLibInstance->renderPath();
- }
- }
- }
-}
void render_hud_attachments()
{
LLMemType mt_ra(LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS);
@@ -1266,7 +1234,6 @@ void render_ui(F32 zoom_factor, int subfield)
{
render_disconnected_background();
}
-
render_ui_2d();
LLGLState::checkStates();
}