[FIXED] glDrawElements() that takes explicit type enum and a ByteBuffer

Started by lhkbob, July 16, 2013, 23:40:56

Previous topic - Next topic

lhkbob

Hi LWJGL devs,

I've found the glVertexPointer/glNormalPointer variants that take the int type parameter and a ByteBuffer to be easier to work with for my engine than casting or otherwise holding onto the wrapping Float/Int/ShortBuffers and calling the simpler signature.

I could not find a similar method for glDrawElements in 2.9.0, there are only varieties for Byte/Short/IntBuffer that assume types of UNSIGNED_BYTE/SHORT/INT respectively.  I saw in the source for LWJGL 3 that the glDrawElements has the added method I desire, but since that is some time off, is it possible to include it in a minor revision of 2.9?

Thanks for the great work,
lhkbob

spasi

Hey lhkbob,

Thank you for the suggestion. I've added a DrawElements version with explicit count & type parameters.