From 6043db8dd1b26ec0e44769659c897a1e97c238ae Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 16 Apr 2004 05:19:02 +0000 Subject: [PATCH] use glDrawRangeElements. I think we can assume it will be present if hardware VBOs are available. --- stepmania/src/RageDisplay_OGL.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index f15345d4c7..869d039fb4 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -1147,20 +1147,14 @@ public: #define BUFFER_OFFSET(o) ((char*)(o)) - glDrawElements( + GLExt::glDrawRangeElements( GL_TRIANGLES, - meshInfo.iTriangleCount*3, - GL_UNSIGNED_SHORT, + meshInfo.iVertexStart, // minimum array index contained in indices + meshInfo.iVertexStart+meshInfo.iVertexCount-1, + // maximum array index contained in indices + meshInfo.iTriangleCount*3, // number of elements to be rendered + GL_UNSIGNED_SHORT, BUFFER_OFFSET(meshInfo.iTriangleStart*sizeof(msTriangle)) ); - -// GLExt::glDrawRangeElements( -// GL_TRIANGLES, -// meshInfo.iVertexStart, // minimum array index contained in indices -// meshInfo.iVertexStart+meshInfo.iVertexCount-1, -// // maximum array index contained in indices -// meshInfo.iTriangleCount*3, // number of elements to be rendered -// GL_UNSIGNED_SHORT, -// BUFFER_OFFSET(0) ); AssertNoGLError(); GLExt::glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );