diff options
author | prep <prep@lindenlab.com> | 2011-12-07 17:56:02 -0500 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2011-12-07 17:56:02 -0500 |
commit | 8974278746932fe470e2cbc52511fbc915f1e893 (patch) | |
tree | bc8323ebdf7c6ceafa10dc808376df299a05d0d9 /indra/llrender | |
parent | 0b99da8ba522da1a4a1e4b6dba24ee8dac42de60 (diff) |
Turning on navmesh rendering toggles normal renderables
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llrendernavprim.cpp | 18 | ||||
-rw-r--r-- | indra/llrender/llrendernavprim.h | 2 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 3 |
3 files changed, 13 insertions, 10 deletions
diff --git a/indra/llrender/llrendernavprim.cpp b/indra/llrender/llrendernavprim.cpp index e88972219d..73bc21ab7c 100644 --- a/indra/llrender/llrendernavprim.cpp +++ b/indra/llrender/llrendernavprim.cpp @@ -51,25 +51,27 @@ void LLRenderNavPrim::renderSegment( const LLVector3& start, const LLVector3& en //=============================================================================
void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color ) const
{
- LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glPolygonMode(GL_NONE, GL_FILL);
+ LLGLDisable cull(GL_CULL_FACE);
+ LLGLEnable lighting( GL_LIGHTING );
+ //glEnable(GL_POLYGON_STIPPLE);
glLineWidth(1.5f);
- LLColor4 colorA( color );
+ LLColor4 colorA( color );
gGL.color4fv( colorA.mV ); + gGL.begin(LLRender::TRIANGLES); { gGL.vertex3fv( a.mV ); gGL.vertex3fv( b.mV ); gGL.vertex3fv( c.mV ); } - gGL.end();
-
- glLineWidth(1.f);
+ gGL.end(); + gGL.flush();
}
//=============================================================================
-void LLRenderNavPrim::renderNavMeshVB( const LLVertexBuffer* pVBO, int vertCnt ) const
+void LLRenderNavPrim::renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt )
{
- //pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX ); + //pVBO->setBuffer( LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR ); pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
}
//=============================================================================
\ No newline at end of file diff --git a/indra/llrender/llrendernavprim.h b/indra/llrender/llrendernavprim.h index f8fabfa95f..cd57fd2223 100644 --- a/indra/llrender/llrendernavprim.h +++ b/indra/llrender/llrendernavprim.h @@ -44,7 +44,7 @@ public: //Draw simple tri
void renderTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, int color ) const;
//Draw the contents of vertex buffer
- void renderNavMeshVB( const LLVertexBuffer* pVBO, int vertCnt ) const;
+ void renderNavMeshVB( LLVertexBuffer* pVBO, int vertCnt );
private:
};
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 8fd1193780..701944ea61 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -411,7 +411,8 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const llerrs << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl; } - if (mGLBuffer != sGLRenderBuffer || useVBOs() != sVBOActive) + BOOL uvb = useVBOs(); + if (mGLBuffer != sGLRenderBuffer || uvb != sVBOActive) { llerrs << "Wrong vertex buffer bound." << llendl; } |