I am trying to render some old level data using the glDrawRangeElements() command. My vertices are set up correctly, my indices are set up correctly, but I can't seem to get it to render. I finally checked online and came across the example found here: http://www.songho.ca/opengl/gl_vertexarray.html
From the example, I think I have been doing it incorrectly. Apparently the start is an index value and the ending is an index value, rather than an index into the indices array. I assumed that for example if you wanted to render 10 triangles, the start would be 0 and the ending would be 29 and the count would be 30. But I am apparently wrong?
That would only be correct if the index value at 0, and 29 were in fact 0 and 29. So if the indices started with 400 and ended with 452, the call to that same array would instead be
glDrawRangeElements(GL_TRIANGLES, 400, 452, 29, GL_UNSIGNED_BYTE, indices);
Is that correct? Does anyone else think this is a little counter intuitive? Any other advice about vertex arrays?