diff options
author | Todd Stinson <stinson@lindenlab.com> | 2011-12-14 11:34:20 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2011-12-14 11:34:20 -0800 |
commit | 28b298c4c7b3487a278aafb545356231962ef965 (patch) | |
tree | 332f940484555c7fe0c79799769d113aea1ecb14 /indra/llrender/llrendernavprim.cpp | |
parent | 98a8057bdc661394e362ebd5c3f3f26d92dac12f (diff) | |
parent | 6c9b33286788057489a894edea477ee58509f2ef (diff) |
Pull and merge from ssh://hg@bitbucket.org/prep/viewer-development-havokai.
Diffstat (limited to 'indra/llrender/llrendernavprim.cpp')
-rw-r--r-- | indra/llrender/llrendernavprim.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp index 96027ba65b..c80ad3e180 100644 --- a/indra/llrender/llrendernavprim.cpp +++ b/indra/llrender/llrendernavprim.cpp @@ -30,12 +30,12 @@ #include "llerror.h"
#include "llglheaders.h"
#include "llvertexbuffer.h"
+
//=============================================================================
LLRenderNavPrim gRenderNav;
//=============================================================================
void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color ) const
-{
-
+{
LLColor4 colorA( color );
glLineWidth(1.5f);
gGL.color3fv( colorA.mV );
@@ -46,18 +46,17 @@ void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& en gGL.vertex3fv( end.mV );
}
gGL.end();
+
glLineWidth(1.0f);
}
//=============================================================================
void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color ) const
{
- glPolygonMode(GL_NONE, GL_FILL);
+ glLineWidth(1.5f);
+ glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
LLGLDisable cull(GL_CULL_FACE);
- //LLGLEnable lighting( GL_LIGHTING );
- //glEnable(GL_POLYGON_STIPPLE);
- glLineWidth(1.5f);
LLColor4 colorA( color );
- colorA*=2.0f;
+ colorA*=1.5f;
gGL.color4fv( colorA.mV );
gGL.begin(LLRender::TRIANGLES);
@@ -67,20 +66,16 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L gGL.vertex3fv( c.mV );
}
gGL.end();
+
gGL.flush();
}
//=============================================================================
void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
{
- glPolygonMode(GL_NONE, GL_FILL);
- LLGLDisable cull(GL_CULL_FACE);
- glColor3f ( 1.0f, 0.0f, 0.0f ) ;
- glDisable( GL_COLOR_MATERIAL );
-
- pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR );
+ glLineWidth(1.5f);
+ glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+ LLGLDisable cull(GL_CULL_FACE);
+ pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX );
pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
- gGL.flush();
- glEnable( GL_COLOR_MATERIAL );
-
}
//=============================================================================
|