summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2010-12-16 22:09:49 -0800
committerDon Kjer <don@lindenlab.com>2010-12-16 22:09:49 -0800
commit14e402cf5e8274caddaf1c763c2e044c53514b1e (patch)
tree8acd92750135358bf8827d6e30ba1a5e57c89b58 /indra/newview/llspatialpartition.cpp
parent84516e337d887bf871e361bfebfce2695e8f443c (diff)
ER-414: Add object update type debug rendering view
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r--indra/newview/llspatialpartition.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 3dd0e1081e..8adb8c30e0 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2580,11 +2580,40 @@ void renderCrossHairs(LLVector3 position, F32 size, LLColor4 color)
void renderUpdateType(LLDrawable* drawablep)
{
+ LLViewerObject* vobj = drawablep->getVObj();
+ if (!vobj || OUT_UNKNOWN == vobj->getLastUpdateType())
+ {
+ return;
+ }
+ LLGLEnable blend(GL_BLEND);
+ switch (vobj->getLastUpdateType())
+ {
+ case OUT_FULL:
+ glColor4f(0,1,0,0.5f);
+ break;
+ case OUT_TERSE_IMPROVED:
+ glColor4f(0,1,1,0.5f);
+ break;
+ case OUT_FULL_COMPRESSED:
+ if (vobj->getLastUpdateCached())
+ {
+ glColor4f(1,0,0,0.5f);
+ }
+ else
+ {
+ glColor4f(1,1,0,0.5f);
+ }
+ break;
+ case OUT_FULL_CACHED:
+ glColor4f(0,0,1,0.5f);
+ break;
+ default:
+ llwarns << "Unknown update_type " << vobj->getLastUpdateType() << llendl;
+ break;
+ };
S32 num_faces = drawablep->getNumFaces();
if (num_faces)
{
- LLGLEnable blend(GL_BLEND);
- glColor4f(0,1,1,0.5f);
for (S32 i = 0; i < num_faces; ++i)
{
pushVerts(drawablep->getFace(i), LLVertexBuffer::MAP_VERTEX);