summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2012-01-05 17:02:22 -0500
committerprep <prep@lindenlab.com>2012-01-05 17:02:22 -0500
commit22b877e70a6f72256ff585465232bed93792571d (patch)
tree7964a5d8278f0a79479ac5ad6f31a7dfcea55d48 /indra/llrender
parente2fd0266ca7249e2008b68f11050973d1e429a62 (diff)
WIP: Navmesh vbos rendering fixes (added normal and color maps).
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llrendernavprim.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index 1a0103e8f0..9a114609d2 100644
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
@@ -67,7 +67,7 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L
}
LLGLDisable cull(GL_CULL_FACE);
LLColor4 colorA( color );
- colorA*=1.5f;
+ colorA*=1.25f;
gGL.color4fv( colorA.mV );
LLGLSLShader::sNoFixedFunction = false;
gGL.begin(LLRender::TRIANGLES);
@@ -86,11 +86,22 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L
void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
{
glLineWidth(1.5f);
- glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
- LLGLDisable cull(GL_CULL_FACE);
LLGLSLShader::sNoFixedFunction = false;
- pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX );
- pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
+
+ LLGLEnable depth(GL_DEPTH_TEST);
+ glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+ LLGLEnable cull( GL_CULL_FACE );
+
+ //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 );
+ //static GLubyte red[]= { 255.0f, 0.0f, 0.0f, 255.0f };
+ //glColor4ubv( red );
+ //pass 2 outlined
+ //pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
LLGLSLShader::sNoFixedFunction = true;
+ glLineWidth(1.0f);
+ glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
}
//=============================================================================