summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml12
-rw-r--r--indra/llrender/llrendernavprim.cpp20
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp2
-rw-r--r--indra/newview/llviewerdisplay.cpp87
4 files changed, 65 insertions, 56 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 7fc434ce17..2f5351d71b 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1110,9 +1110,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>def036f4001f9b95824ea490a0d71560</string>
+ <string>0fb8533cb26dd2707d10904cd4c177b9</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249863/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120222.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249990/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120224.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1122,9 +1122,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>57dd508275c311e98c7ee39cd58b517f</string>
+ <string>32712ec04262c251e84a277ef0215c4a</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249863/arch/Linux/installer/llphysicsextensions-0.1-linux-20120222.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249990/arch/Linux/installer/llphysicsextensions-0.1-linux-20120224.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@@ -1134,9 +1134,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>6902dc4da5e6be1c1f5f0275a5a8d8ef</string>
+ <string>4604a26b599e7cb2478835fcceff7f24</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249863/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120222.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249990/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120224.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index 30d470729f..47cc996043 100644
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
@@ -37,6 +37,7 @@ LLRenderNavPrim gRenderNav;
//=============================================================================
void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color, bool overlayMode ) const
{
+ bool ff = LLGLSLShader::sNoFixedFunction;
LLGLSLShader::sNoFixedFunction = false;
LLGLEnable smooth(GL_LINE_SMOOTH);
LLColor4 colorA( color );
@@ -51,7 +52,7 @@ void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& en
gGL.end();
gGL.flush();
- LLGLSLShader::sNoFixedFunction = true;
+ LLGLSLShader::sNoFixedFunction = ff;
LLGLDisable smoothout(GL_LINE_SMOOTH);
glLineWidth(1.0f);
}
@@ -70,7 +71,8 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L
LLGLEnable cull(GL_CULL_FACE);
LLColor4 colorA( color );
colorA*=1.25f;
- gGL.color4fv( colorA.mV );
+ gGL.color4fv( colorA.mV );
+ bool ff = LLGLSLShader::sNoFixedFunction;
LLGLSLShader::sNoFixedFunction = false;
gGL.begin(LLRender::TRIANGLES);
{
@@ -82,27 +84,27 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L
gGL.flush();
glLineWidth(1.0f);
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- LLGLSLShader::sNoFixedFunction = true;
+ LLGLSLShader::sNoFixedFunction = ff;
}
//=============================================================================
void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
{
- LLGLSUIDefault gls_ui;
- LLGLEnable depth( GL_DEPTH_TEST );
+ LLGLEnable blend( GL_BLEND );
LLGLEnable cull( GL_CULL_FACE );
- glLineWidth(1.5f);
+ glLineWidth(1.5f);
+ bool ff = LLGLSLShader::sNoFixedFunction;
LLGLSLShader::sNoFixedFunction = false;
//pass 1 filled
pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_NORMAL );
pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
- LLGLEnable smooth(GL_LINE_SMOOTH);
+ LLGLEnable smooth( GL_LINE_SMOOTH );
//pass 2 outlined
pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
- LLGLSLShader::sNoFixedFunction = true;
+ LLGLSLShader::sNoFixedFunction = ff;
glLineWidth(1.0f);
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- LLGLDisable smoothout(GL_LINE_SMOOTH);
+ LLGLDisable smoothout( GL_LINE_SMOOTH );
}
//=============================================================================
void LLRenderNavPrim::renderStar( const LLVector3& center, const float scale, int color ) const
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 7795397803..e09bc028ce 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -248,7 +248,7 @@ void LLFloaterPathfindingConsole::onClose(bool pIsAppQuitting)
{
mAgentStateSlot.disconnect();
}
-
+ LLPathingLib::getInstance()->cleanupResidual();
LLFloater::onClose(pIsAppQuitting);
}
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index c58783d64b..42c04f3fd8 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -113,6 +113,7 @@ 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()
{
@@ -671,8 +672,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (!for_snapshot)
{
if (gFrameCount > 1)
- { //for some reason, ATI 4800 series will error out if you
- //try to generate a shadow before the first frame is through
+ {
+ //for some reason, ATI 4800 series will error out if you
+ //try to generate a shadow before the first frame is through
gPipeline.generateSunShadow(*LLViewerCamera::getInstance());
}
@@ -883,8 +885,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderGeom");
- bool exclusiveDraw = false;
- BOOL allowRenderables = false;
+ bool exclusiveNavDraw = false;
+ bool allowRenderables = false;
if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot())
&& !gRestoreGL)
{
@@ -893,43 +895,12 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gGL.setColorMask(true, false);
if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
{
- gPipeline.renderGeomDeferred(*LLViewerCamera::getInstance());
- }
- else
- {
- //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())
- {
- llPathingLibInstance->renderNavMesh();
- exclusiveDraw = true;
- }
- //physics/exclusion shapes
- if (pathfindingConsole->isRenderExclusionVolumes())
- {
- llPathingLibInstance->renderNavMeshShapesVBO();
- exclusiveDraw = true;
- }
- //User designated path
- if (pathfindingConsole->isRenderPath())
- {
- llPathingLibInstance->renderPath();
- }
- }
- }
+ gPipeline.renderGeomDeferred(*LLViewerCamera::getInstance());
}
+
+ render_navmesh( allowRenderables, exclusiveNavDraw );
- if ( !exclusiveDraw || allowRenderables )
+ if ( !exclusiveNavDraw || allowRenderables )
{
gPipeline.renderGeom(*LLViewerCamera::getInstance(), TRUE);
}
@@ -985,7 +956,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
}
}
- if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
+ if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender )
{
gPipeline.renderDeferredLighting();
}
@@ -1021,6 +992,42 @@ 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->isRenderExclusionVolumes() )
+ {
+ llPathingLibInstance->renderNavMeshShapesVBO();
+ exclusiveNavDraw = true;
+ }
+ //User designated path
+ if ( pathfindingConsole->isRenderPath() )
+ {
+ llPathingLibInstance->renderPath();
+ }
+ }
+ }
+}
void render_hud_attachments()
{
LLMemType mt_ra(LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS);