From fef78653cd2a81efb032d7570fc5e5a0814086b7 Mon Sep 17 00:00:00 2001
From: prep <prep@lindenlab.com>
Date: Thu, 5 Apr 2012 14:27:05 -0400
Subject: [PATCH] consolidate navmesh rendering calls

---
 indra/llrender/llrendernavprim.cpp | 10 ++--------
 indra/llrender/llrendernavprim.h   |  4 +---
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index 2632428dfdc..100b614aae2 100644
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
@@ -75,16 +75,10 @@ void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const
 	gGL.end();		
 }
 //=============================================================================
-void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
+void LLRenderNavPrim::renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertCnt )
 {	
 	pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_NORMAL );
-	pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );	
-}
-//=============================================================================
-void LLRenderNavPrim::renderNavMeshEdgeVB( LLVertexBuffer* pVBO, int vertCnt )
-{	
-	pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_NORMAL );
-	pVBO->drawArrays( LLRender::LINES, 0, vertCnt );	
+	pVBO->drawArrays( mode, 0, vertCnt );	
 }
 //=============================================================================
 void LLRenderNavPrim::renderStar( const LLVector3& center, const float scale, const LLColor4U& color ) const
diff --git a/indra/llrender/llrendernavprim.h b/indra/llrender/llrendernavprim.h
index 809debb0069..97d1c805afd 100644
--- a/indra/llrender/llrendernavprim.h
+++ b/indra/llrender/llrendernavprim.h
@@ -46,9 +46,7 @@ class LLRenderNavPrim
 		//Draw simple tri
 	void renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color, const LLVector3& n ) const;
 	//Draw the contents of vertex buffer
-	void renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt );
-	//Draw the contents of the edge vertex buffer
-	void renderNavMeshEdgeVB( LLVertexBuffer* pVBO, int vertCnt );
+	void renderNavMeshVB( U32 mode, LLVertexBuffer* pVBO, int vertCnt );
 	//Draw a star
 	void renderStar( const LLVector3& center, const float scale, const LLColor4U& color ) const;
 	//Flush the device
-- 
GitLab