summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-04-22 14:45:28 -0500
committerDave Parks <davep@lindenlab.com>2010-04-22 14:45:28 -0500
commit128dc9e4668afe7b2f63e3980f78a8ca1116182b (patch)
treeda92862b3afe1c49f2c1b7ce6852aca86932d79a /indra
parent8496f2673971d0b3ba0f22623d7007cd163f8b02 (diff)
parentc074404d9dbaa7ccdbd863e4a9e7e3eff97e7816 (diff)
merge
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();
}