aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llrender/llvertexbuffer.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llrender/llvertexbuffer.cpp')
-rw-r--r--linden/indra/llrender/llvertexbuffer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/linden/indra/llrender/llvertexbuffer.cpp b/linden/indra/llrender/llvertexbuffer.cpp
index 9635ae3..547663b 100644
--- a/linden/indra/llrender/llvertexbuffer.cpp
+++ b/linden/indra/llrender/llvertexbuffer.cpp
@@ -190,10 +190,12 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
190 if (mode > NUM_MODES) 190 if (mode > NUM_MODES)
191 { 191 {
192 llerrs << "Invalid draw mode: " << mode << llendl; 192 llerrs << "Invalid draw mode: " << mode << llendl;
193 return;
193 } 194 }
194 195
195 glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT, 196 glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT,
196 ((U16*) getIndicesPointer()) + indices_offset); 197 ((U16*) getIndicesPointer()) + indices_offset);
198 stop_glerror();
197} 199}
198 200
199void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const 201void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
@@ -217,6 +219,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
217 if (mode > NUM_MODES) 219 if (mode > NUM_MODES)
218 { 220 {
219 llerrs << "Invalid draw mode: " << mode << llendl; 221 llerrs << "Invalid draw mode: " << mode << llendl;
222 return;
220 } 223 }
221 224
222 glDrawElements(sGLMode[mode], count, GL_UNSIGNED_SHORT, 225 glDrawElements(sGLMode[mode], count, GL_UNSIGNED_SHORT,
@@ -240,9 +243,11 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
240 if (mode > NUM_MODES) 243 if (mode > NUM_MODES)
241 { 244 {
242 llerrs << "Invalid draw mode: " << mode << llendl; 245 llerrs << "Invalid draw mode: " << mode << llendl;
246 return;
243 } 247 }
244 248
245 glDrawArrays(sGLMode[mode], first, count); 249 glDrawArrays(sGLMode[mode], first, count);
250 stop_glerror();
246} 251}
247 252
248//static 253//static