summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2012-01-19 14:38:16 -0500
committerprep <prep@lindenlab.com>2012-01-19 14:38:16 -0500
commite2ef5a5edce6a01724d91fde5b471b0bae18d045 (patch)
treeb5b0bb9796cd893aad8ce3ca329dfcb11026b035 /indra/llrender
parente683c48e466c264642dc42997327410fb6ebae7f (diff)
Path-196 : vbo cleanup, visual fixes (path-222)
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llrendernavprim.cpp19
-rw-r--r--indra/llrender/llrendernavprim.h8
2 files changed, 21 insertions, 6 deletions
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index 3d76f08496..71e808d04e 100644
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
@@ -1,6 +1,6 @@
/**
* @file LLRenderNavPrim.cpp
- * @brief
+ * @brief Renderable primitives used by the pathing library
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -35,7 +35,7 @@
//=============================================================================
LLRenderNavPrim gRenderNav;
//=============================================================================
-void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color,bool overlayMode ) const
+void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color, bool overlayMode ) const
{
LLGLSLShader::sNoFixedFunction = false;
LLColor4 colorA( color );
@@ -54,7 +54,7 @@ void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& en
glLineWidth(1.0f);
}
//=============================================================================
-void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color,bool overlayMode ) const
+void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color, bool overlayMode ) const
{
glLineWidth(1.5f);
if ( overlayMode )
@@ -101,3 +101,16 @@ void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
}
//=============================================================================
+void LLRenderNavPrim::renderStar( const LLVector3& center, const float scale, int color ) const
+{
+ for (int k=0; k<3; k++)
+ {
+ LLVector3 star, pt1, pt2;
+ star = LLVector3( 0.0f,0.0f,0.0f);
+ star[k] = 0.5f;
+ pt1 = center + star;
+ pt2 = center - star;
+ renderSegment( pt1, pt2, color, false );
+ }
+}
+//=============================================================================
diff --git a/indra/llrender/llrendernavprim.h b/indra/llrender/llrendernavprim.h
index a30a14551d..d88fe656b7 100644
--- a/indra/llrender/llrendernavprim.h
+++ b/indra/llrender/llrendernavprim.h
@@ -40,11 +40,13 @@ class LLRenderNavPrim
{
public:
//Draw a line
- void renderSegment( const LLVector3& start, const LLVector3& end, int color,bool overlayMode ) const;
+ void renderSegment( const LLVector3& start, const LLVector3& end, int color, bool overlayMode ) const;
//Draw simple tri
- void renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color,bool overlayMode ) const;
+ void renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color, bool overlayMode ) const;
//Draw the contents of vertex buffer
- void renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt );
+ void renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt );
+ //Draw a star
+ void renderStar( const LLVector3& center, const float scale, int color ) const;
private:
};