[CLOSED] No glMultiDrawElements?

Started by quew8, May 04, 2013, 20:20:11

Previous topic - Next topic

quew8

I have been unable to find this method in any of the GLXX classes - pretty sure it should be in GL14.
http://www.opengl.org/sdk/docs/man2/xhtml/glMultiDrawElements.xml

spasi

The reason is that it's quite awkward to call a function that accepts a pointer-to-pointers from Java. It'd have to be mapped to an array at the Java side and the generator would have to emit lots of code at the C side to make it work properly. A lot of complexity for little gain compared to a DrawElements loop.

With that said, LWJGL 3.0 has support for it, but in the lightest possible way. You can see the code here (Java) and here (C). The user is responsible for building the pointer array, which is mapped to a PointerBuffer. This is the theme in 3.0 in general; all JNI functions are very slim, only casts + native calls.

quew8

Ok, I understand. I thought it might be something like that except for there being a glMultDrawArrays but now I see that's different.
Also, the more I hear about 3.0 ... Great work as ever, you seem to have solved every problem before I even know it's there.