summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorprep <none@none>2012-02-13 10:10:57 -0500
committerprep <none@none>2012-02-13 10:10:57 -0500
commit6d6c38f21688eb99691a8273e0779c50dfa69db7 (patch)
tree1e3e329266c1761955cfd4a9f531056859fb78c1 /indra
parentdd760059905cf7fcd312cbbfcca8c32553e69f7c (diff)
Path-197. Navmeshes are converted into vbos.
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llrendernavprim.cpp6
-rw-r--r--indra/newview/llviewerdisplay.cpp3
2 files changed, 5 insertions, 4 deletions
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index 71e808d04e..b99a8cdc86 100644
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
@@ -38,6 +38,7 @@ LLRenderNavPrim gRenderNav;
void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color, bool overlayMode ) const
{
LLGLSLShader::sNoFixedFunction = false;
+ LLGLEnable smooth(GL_LINE_SMOOTH);
LLColor4 colorA( color );
glLineWidth(1.5f);
gGL.color3fv( colorA.mV );
@@ -51,6 +52,7 @@ void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& en
gGL.flush();
LLGLSLShader::sNoFixedFunction = true;
+ LLGLDisable smoothout(GL_LINE_SMOOTH);
glLineWidth(1.0f);
}
//=============================================================================
@@ -86,7 +88,7 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L
void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
{
LLGLSUIDefault gls_ui;
- glEnable( GL_DEPTH_TEST );
+ LLGLEnable depth( GL_DEPTH_TEST );
LLGLEnable cull( GL_CULL_FACE );
glLineWidth(1.5f);
LLGLSLShader::sNoFixedFunction = false;
@@ -94,11 +96,13 @@ void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
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);
//pass 2 outlined
pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
LLGLSLShader::sNoFixedFunction = true;
glLineWidth(1.0f);
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+ LLGLDisable smoothout(GL_LINE_SMOOTH);
}
//=============================================================================
void LLRenderNavPrim::renderStar( const LLVector3& center, const float scale, int color ) const
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 719f560101..0579273d25 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -907,9 +907,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//NavMesh
if ( llPathingLibInstance->getRenderNavMeshState() )
{
- glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
- glEnable(GL_DEPTH_TEST);
- gGL.setAmbientLightColor( LLColor4::white );
llPathingLibInstance->renderNavMesh();
exclusiveDraw = true;
}