diff options
author | prep <none@none> | 2011-12-09 15:56:12 -0500 |
---|---|---|
committer | prep <none@none> | 2011-12-09 15:56:12 -0500 |
commit | 4c60c59610493c5f95776af2ac93ff34f741b427 (patch) | |
tree | 92e5057c08cb35817a1761df22295a596b4eebf0 /indra/llrender | |
parent | a5e2dad53dda8585b82a2e6ae84f178aa25bcb67 (diff) |
added vbo support for physics shapes & fixed navmesh/shape menu toggle
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llrendernavprim.cpp | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp index 3e14c34168..96027ba65b 100644 --- a/indra/llrender/llrendernavprim.cpp +++ b/indra/llrender/llrendernavprim.cpp @@ -24,7 +24,7 @@ * $/LicenseInfo$
*/
- +
#include "linden_common.h"
#include "llrendernavprim.h"
#include "llerror.h"
@@ -34,17 +34,17 @@ LLRenderNavPrim gRenderNav;
//=============================================================================
void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& end, int color ) const
-{ +{
LLColor4 colorA( color );
glLineWidth(1.5f);
- gGL.color3fv( colorA.mV ); - - gGL.begin(LLRender::LINES); - { - gGL.vertex3fv( start.mV ); - gGL.vertex3fv( end.mV ); - } + gGL.color3fv( colorA.mV );
+
+ gGL.begin(LLRender::LINES);
+ {
+ gGL.vertex3fv( start.mV );
+ gGL.vertex3fv( end.mV );
+ }
gGL.end();
glLineWidth(1.0f);
}
@@ -58,21 +58,29 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L glLineWidth(1.5f);
LLColor4 colorA( color );
colorA*=2.0f;
- gGL.color4fv( colorA.mV ); - - gGL.begin(LLRender::TRIANGLES); - { - gGL.vertex3fv( a.mV ); - gGL.vertex3fv( b.mV ); - gGL.vertex3fv( c.mV ); - } - gGL.end(); + gGL.color4fv( colorA.mV );
+
+ gGL.begin(LLRender::TRIANGLES);
+ {
+ gGL.vertex3fv( a.mV );
+ gGL.vertex3fv( b.mV );
+ gGL.vertex3fv( c.mV );
+ }
+ gGL.end();
gGL.flush();
}
//=============================================================================
void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
{
- //pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR ); + glPolygonMode(GL_NONE, GL_FILL);
+ LLGLDisable cull(GL_CULL_FACE);
+ glColor3f ( 1.0f, 0.0f, 0.0f ) ;
+ glDisable( GL_COLOR_MATERIAL );
+
+ pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR );
pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
+ gGL.flush();
+ glEnable( GL_COLOR_MATERIAL );
+
}
-//=============================================================================
\ No newline at end of file +//=============================================================================
|