diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-06-15 14:29:46 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-06-15 14:29:46 -0500 |
| commit | 99dc246ac843114f20f7aa99531451fcf46df3ed (patch) | |
| tree | d94a0a31e00c53ea359d9939d1928180d398b334 /indra/newview/lldrawpooltree.cpp | |
| parent | a519e34f02b4b2663fe082ba9ad12f1b423669cb (diff) | |
| parent | d76715776bb9e26577c4e505745eb2773e8a4796 (diff) | |
Merge
Diffstat (limited to 'indra/newview/lldrawpooltree.cpp')
| -rw-r--r-- | indra/newview/lldrawpooltree.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 3165a3516c..83f04e45a8 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -37,6 +37,7 @@ #include "llviewershadermgr.h" #include "llrender.h" #include "llviewercontrol.h" +#include "llviewerregion.h" S32 LLDrawPoolTree::sDiffTex = 0; static LLGLSLShader* shader = NULL; @@ -104,8 +105,22 @@ void LLDrawPoolTree::render(S32 pass) { LLFace *face = *iter; LLVertexBuffer* buff = face->getVertexBuffer(); + if(buff) { + LLMatrix4* model_matrix = &(face->getDrawable()->getRegion()->mRenderMatrix); + + if (model_matrix != gGLLastMatrix) + { + gGLLastMatrix = model_matrix; + gGL.loadMatrix(gGLModelView); + if (model_matrix) + { + gGL.multMatrix((GLfloat*) model_matrix->mMatrix); + } + gPipeline.mMatrixOpCount++; + } + buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0); gPipeline.addTrianglesDrawn(buff->getNumIndices()); |
