Added normal support to navmesh tri renderer.

meow-7.2.2
prep 2012-04-03 13:06:21 -04:00
parent 27e4d822e1
commit 2388de3f95
2 changed files with 4 additions and 3 deletions

View File

@ -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 );

View File

@ -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