summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-04-22 14:44:34 -0500
committerDave Parks <davep@lindenlab.com>2010-04-22 14:44:34 -0500
commitc074404d9dbaa7ccdbd863e4a9e7e3eff97e7816 (patch)
treeecacab55e80dd18d9322188f6d4c9cac83ebb605 /indra
parentcb1ece05ddb71218de4c35df520937ffdda83434 (diff)
Que?
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llvertexbuffer.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 668e9e55f9..7fa47cd171 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -271,9 +271,22 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
return;
}
+ U16* idx = ((U16*) getIndicesPointer())+indices_offset;
+
+ if (gDebugGL && !useVBOs())
+ {
+ for (U32 i = 0; i < count; ++i)
+ {
+ if (idx[i] < start || idx[i] > end)
+ {
+ llerrs << "Index out of range: " << idx[i] << " not in [" << start << ", " << end << "]" << llendl;
+ }
+ }
+ }
+
stop_glerror();
glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT,
- ((U16*) getIndicesPointer()) + indices_offset);
+ idx);
stop_glerror();
}