summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpooltree.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-07-31 14:55:15 -0400
committerOz Linden <oz@lindenlab.com>2012-07-31 14:55:15 -0400
commitdf93749819c503a66bc0ad34aeb1c7bed3746df2 (patch)
tree9bc6ae94c08fd881b8a73bfc0bc4ea79169ebf9e /indra/newview/lldrawpooltree.cpp
parent764d1e3cafa3e86f1f44a4c2bec0705879b9da38 (diff)
parentb8bac66a0f8c392a221ad2c64611e2a55de82339 (diff)
merge up to latest viewer-development
Diffstat (limited to 'indra/newview/lldrawpooltree.cpp')
-rw-r--r--indra/newview/lldrawpooltree.cpp15
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());