diff options
-rw-r--r-- | indra/llrender/llrendernavprim.cpp | 48 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 13 |
3 files changed, 36 insertions, 27 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 +//=============================================================================
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 91ca4175f4..caa5982f56 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -105,7 +105,7 @@ class LLNavMeshShapeRenderingToggle : public view_listener_t {
if ( LLPathingLib::getInstance() )
{
- LLPathingLib::getInstance()->toggleRenderNavMeshandShapesState( );
+ LLPathingLib::getInstance()->toggleRenderShapeState( );
}
return true;
}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 40cefb8d05..8b51d1cd6c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3646,21 +3646,21 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { - //prep# - enableLightsFullbright(LLColor4(1,1,1,1)); - + if ( LLPathingLib::getInstance() ) { - + //prep# + enableLightsFullbright(LLColor4(1,1,1,1)); + bool exclusiveDraw = false; if ( LLPathingLib::getInstance()->getRenderNavMeshState() ) { LLPathingLib::getInstance()->renderNavMesh(); exclusiveDraw = true; } - if ( LLPathingLib::getInstance()->getRenderNavMeshandShapesState() ) + if ( LLPathingLib::getInstance()->getRenderShapeState() ) { - //LLPathingLib::getInstance()->renderNavMeshShapesVBO(); + LLPathingLib::getInstance()->renderNavMeshShapesVBO(); exclusiveDraw = true; } @@ -8142,6 +8142,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gGL.setColorMask(true, false); renderGeom(camera); + } LLPipeline::sUnderWaterRender = FALSE; |