libgdx has this code for LWJGL:
https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGL20.java#L695
This is not ideal since asFloatBuffer() allocates. Is there a way to call glVertexAttribPointer without allocating when I have a ByteBuffer that contains float data?
Added an alternative VertexAttribPointer with ByteBuffer data and explicit type parameter. Check the next nightly.
Cool! 8) The following methods are also affected (though I only checked what libgdx uses):
glDrawElements
glColorPointer
glNormalPointer
glTexCoordPointer
glVertexPointer
glColorPointer
I added alternatives for the *Pointer functions, but not for DrawElements. With an explicit type, the count argument would have to be exposed too. I don't think it's worth it, you shouldn't be using anything but short indices anyway.
Sounds good, thanks!