diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llrendernavprim.cpp | 18 | ||||
-rw-r--r-- | indra/llrender/llrendernavprim.h | 2 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 3 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 41 |
4 files changed, 39 insertions, 25 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; } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 97b69370c9..40cefb8d05 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3644,13 +3644,37 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sDefaultImagep); LLViewerFetchedTexture::sDefaultImagep->setAddressMode(LLTexUnit::TAM_WRAP); + + { + //prep# + enableLightsFullbright(LLColor4(1,1,1,1)); + + if ( LLPathingLib::getInstance() ) + { + + bool exclusiveDraw = false; + if ( LLPathingLib::getInstance()->getRenderNavMeshState() ) + { + LLPathingLib::getInstance()->renderNavMesh(); + exclusiveDraw = true; + } + if ( LLPathingLib::getInstance()->getRenderNavMeshandShapesState() ) + { + //LLPathingLib::getInstance()->renderNavMeshShapesVBO(); + exclusiveDraw = true; + } + + if ( exclusiveDraw ) { return; } + } + } + ////////////////////////////////////////////// // // Actually render all of the geometry // // stop_glerror(); - + LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDrawPools"); for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter) @@ -3784,20 +3808,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) renderDebug(); LLVertexBuffer::unbind(); - - //prep# - if ( LLPathingLib::getInstance() ) - { - if ( LLPathingLib::getInstance()->getRenderNavMeshState() ) - { - LLPathingLib::getInstance()->renderNavMesh(); - } - if ( LLPathingLib::getInstance()->getRenderNavMeshandShapesState() ) - { - LLPathingLib::getInstance()->renderNavMeshandShapes(); - } - } - + if (!LLPipeline::sReflectionRender && !LLPipeline::sRenderDeferred) { if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) |