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?
I’d like to draw a mesh with a big mesh (think ~120k vertices). If
Share
Massive Edit following miniBill comment !
In fact, OpenGL-ES only supports
GL_UNSIGNED_BYTEorGL_UNSIGNED_SHORTfor indices.The most used is
GL_UNSIGNED_SHORTwhich allows 2^16-1 vertices. The other types are only supported by OpenGL.You can also use
GL_INTorGL_UNSIGNED_INTfor indices, which, I suppose, you can store in ajava.nio.IntBuffer.Looks like you’ll need to split your geometry.