summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-05-13 01:31:45 -0500
committerDave Parks <davep@lindenlab.com>2010-05-13 01:31:45 -0500
commit65acaab16ffaa4cc6bed0934973ead659df20741 (patch)
tree700fc18e4acc3b8cabeb48cc928603ef360bfa21 /indra/newview
parent2514a12c8c10fbadc1828802300a6f0755f2d9e6 (diff)
working inworld vis
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llspatialpartition.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index ed99f8648f..025c5084c3 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2671,24 +2671,36 @@ void renderPhysicsShape(LLDrawable* drawable)
if (decomp)
{
gGL.pushMatrix();
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glMultMatrixf((F32*) volume->getRelativeXform().mMatrix);
static std::vector<LLColor4U> color;
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+
for (U32 i = 0; i < decomp->mHull.size(); ++i)
{
if (color.size() <= i)
{
- color.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127));
+ color.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 255));
}
- glColor4ubv(color[i].mV);
-
- LLVertexBuffer* buff = decomp->mMesh;
+
+ LLVertexBuffer* buff = decomp->mMesh[i];
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
+
+ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ glColor4ubv(color[i].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);
+ glColor4ub(color[i].mV[0], color[i].mV[1], color[i].mV[2], 64);
+ buff->drawArrays(LLRender::TRIANGLES, 0, buff->getNumVerts());
+ }
}
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+
gGL.popMatrix();
}
}