Reputation: 1734
I'd like to draw a mesh with a big mesh (think ~120k vertices).
If I try to put all the vertices in a single index buffer it won't work, because I'm using a java.nio.ShortBuffer
as index buffer, so the max is 2^15 - 1, whereas I need ~2^17 vertices. Should I split my mesh in multiple pieces? Can I use other subclasses of Buffer
as the fourth argument to GL10.glDrawElements
?
Upvotes: 1
Views: 327
Reputation: 5238
Massive Edit following miniBill comment !
In fact, OpenGL-ES only supports GL_UNSIGNED_BYTE
or GL_UNSIGNED_SHORT
for indices.
The most used is GL_UNSIGNED_SHORT
which allows 2^16-1 vertices. The other types are only supported by OpenGL.
You can also use GL_INT
or GL_UNSIGNED_INT
for indices, which, I suppose, you can store in a java.nio.IntBuffer
.
Looks like you'll need to split your geometry.
Upvotes: 1