summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r--indra/newview/llspatialpartition.cpp37
1 files changed, 20 insertions, 17 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 68f3fdb1a0..929405232a 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2806,29 +2806,32 @@ void renderMeshBaseHull(LLVOVolume* volume, U32 data_mask, LLColor4& color)
const LLMeshDecomposition* decomp = gMeshRepo.getDecomposition(mesh_id);
if (decomp)
- {
- gGL.pushMatrix();
- glMultMatrixf((F32*) volume->getRelativeXform().mMatrix);
-
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
-
+ {
LLVertexBuffer* buff = decomp->mBaseHullMesh;
- buff->setBuffer(data_mask);
+ if (buff)
+ {
+ gGL.pushMatrix();
+ glMultMatrixf((F32*) volume->getRelativeXform().mMatrix);
+
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- glColor3fv(color.mV);
- buff->drawArrays(LLRender::TRIANGLES, 0, buff->getNumVerts());
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ buff->setBuffer(data_mask);
- {
- LLGLEnable blend(GL_BLEND);
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
- LLGLDepthTest depth(GL_TRUE, GL_FALSE);
- glColor4fv(color.mV);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ glColor3fv(color.mV);
buff->drawArrays(LLRender::TRIANGLES, 0, buff->getNumVerts());
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+
+ {
+ LLGLEnable blend(GL_BLEND);
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
+ LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+ glColor4fv(color.mV);
+ buff->drawArrays(LLRender::TRIANGLES, 0, buff->getNumVerts());
+ }
+ gGL.popMatrix();
}
- gGL.popMatrix();
}
}