diff options
-rw-r--r-- | indra/llrender/llrendernavprim.cpp | 14 | ||||
-rw-r--r-- | indra/llrender/llrendernavprim.h | 8 |
2 files changed, 16 insertions, 6 deletions
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp index eea65b3a0d..e88972219d 100644 --- a/indra/llrender/llrendernavprim.cpp +++ b/indra/llrender/llrendernavprim.cpp @@ -29,11 +29,11 @@ #include "llrendernavprim.h"
#include "llerror.h"
#include "llglheaders.h"
-
+#include "llvertexbuffer.h"
//=============================================================================
LLRenderNavPrim gRenderNav;
//=============================================================================
-void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color )
+void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color ) const
{ LLColor4 colorA( color );
@@ -49,13 +49,13 @@ 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 )
+void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color ) const
{
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glLineWidth(1.5f);
LLColor4 colorA( color );
- gGL.color4fv( colorA.mV ); + gGL.color4fv( colorA.mV ); gGL.begin(LLRender::TRIANGLES); { gGL.vertex3fv( a.mV ); @@ -66,4 +66,10 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L glLineWidth(1.f);
}
+//=============================================================================
+void LLRenderNavPrim::renderNavMeshVB( const LLVertexBuffer* pVBO, int vertCnt ) const
+{
+ //pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX ); + pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
+}
//=============================================================================
\ No newline at end of file diff --git a/indra/llrender/llrendernavprim.h b/indra/llrender/llrendernavprim.h index 697c344d21..f8fabfa95f 100644 --- a/indra/llrender/llrendernavprim.h +++ b/indra/llrender/llrendernavprim.h @@ -39,8 +39,12 @@ class LLRenderNavPrim
{
public:
- void renderSegment( const LLVector3& start, const LLVector3& end, int color );
- void renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color );
+ //Draw a line
+ void renderSegment( const LLVector3& start, const LLVector3& end, int color ) const;
+ //Draw simple tri
+ void renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color ) const;
+ //Draw the contents of vertex buffer
+ void renderNavMeshVB( const LLVertexBuffer* pVBO, int vertCnt ) const;
private:
};
|