I don't understand what's going on! I have this mesh loader, and when I load small meshes with it, my program works fine, drawing the whole mesh. But now that I tested the program with a big mesh (upwards of 100,000 vertices) it only draws a tiny section of it! Is it something with my graphics card, like some insanely small limit or something?
Using LWJGL, some code I picked up from their tutorials:
private ByteBuffer indexBuffer;
...
// Create a new VBO for the indices and select it (bind)
indxBufId = glGenBuffers();
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indxBufId);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexBuffer, GL_STATIC_DRAW);
...
// Bind to the index VBO that has all the information about the order of the vertices
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indxBufId);
// Draw the vertices
glDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_BYTE, 0);
// Put everything back to default (deselect)
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);