use glDrawRangeElements. I think we can assume it will be present if hardware VBOs are available.

This commit is contained in:
Chris Danford
2004-04-16 05:19:02 +00:00
parent 7de8269a67
commit 6043db8dd1
+6 -12
View File
@@ -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 );