From 2388de3f958f019255c1eb50cafb540e87a3ca3a Mon Sep 17 00:00:00 2001
From: prep <none@none>
Date: Tue, 3 Apr 2012 13:06:21 -0400
Subject: Added normal support to navmesh tri renderer.

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

(limited to 'indra')

diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp
index d6da722e0c..7dd042271a 100644
--- a/indra/llrender/llrendernavprim.cpp
+++ b/indra/llrender/llrendernavprim.cpp
@@ -62,12 +62,13 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L
 	gGL.end();		
 }
 //=============================================================================
-void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const
+void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color, const LLVector3& n ) const
 {
 	LLColor4 cV(color);
 	gGL.color4fv( cV.mV );
 	gGL.begin(LLRender::TRIANGLES);
 	{
+		glNormal3f( n.mV[0],n.mV[1],n.mV[2] );
 		gGL.vertex3fv( a.mV );
 		gGL.vertex3fv( b.mV );
 		gGL.vertex3fv( c.mV );
diff --git a/indra/llrender/llrendernavprim.h b/indra/llrender/llrendernavprim.h
index d5899471a6..7fbd02de93 100644
--- a/indra/llrender/llrendernavprim.h
+++ b/indra/llrender/llrendernavprim.h
@@ -43,8 +43,8 @@ public:
 	void renderLLSegment( const LLVector3& start, const LLVector3& end, const LLColor4U& color ) const;
 	//Draw simple tri
 	void renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color ) const;
-	//Draw simple tri
-	void renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const;
+		//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 a star
-- 
cgit v1.2.3