diff options
author | prep <prep@lindenlab.com> | 2012-03-07 11:19:13 -0500 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2012-03-07 11:19:13 -0500 |
commit | 790554b218e49141d999b4ef21ecaaa567535665 (patch) | |
tree | 921194afdd5fd20d229f925c4fcd2c44b3b3ebe7 /indra | |
parent | e5a2e668bef3021540fd4de2d20f40d5c67cddb9 (diff) |
Fix for overlaying navmesh on renderable geometry.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llrendernavprim.cpp | 14 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 35 |
2 files changed, 26 insertions, 23 deletions
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp index 1114d132c7..b697946a1d 100644 --- a/indra/llrender/llrendernavprim.cpp +++ b/indra/llrender/llrendernavprim.cpp @@ -38,7 +38,7 @@ LLRenderNavPrim gRenderNav; void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color, bool overlayMode ) const
{
LLColor4 colorA( color );
- glLineWidth(1.5f);
+ //glLineWidth(1.5f);
gGL.color3fv( colorA.mV );
gGL.begin(LLRender::LINES);
@@ -52,16 +52,6 @@ void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& en //=============================================================================
void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color, bool overlayMode ) const
{
- //glLineWidth(1.5f);
- if ( overlayMode )
- {
- glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
- }
- else
- {
- glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- }
-
LLColor4 colorA( color );
colorA*=1.25f;
gGL.color4fv( colorA.mV );
@@ -72,8 +62,6 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L gGL.vertex3fv( c.mV );
}
gGL.end();
- //glLineWidth(1.0f);
- //move out ...glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
}
//=============================================================================
void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 2c61f70ef4..87e21c1f05 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4328,7 +4328,10 @@ 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 )
@@ -4337,18 +4340,26 @@ void LLPipeline::renderDebug() 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);
+ {
+ 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() )
{
@@ -4361,7 +4372,11 @@ void LLPipeline::renderDebug() }
}
}
- + gGL.flush(); + if (LLGLSLShader::sNoFixedFunction) + { + gUIProgram.unbind(); + } gGL.color4f(1,1,1,1); |