How to use non-Buffer version of glDrawElements in JSR231

(This may be an RTFM kind of question, but I’m coming up short… my apologies if so)

The old, non-JSR JOGL 1.1 had a prototype like this:

public void glDrawElements(int mode, int count, int type, <type>[] indices)

The non-Buffer prototype for glDrawElements in the JSR231 version looks like this:

public void glDrawElements(int mode, int count, int type, long indices_buffer_offset)

What buffer does indices_buffer_offset refer to? How do you pass the index array?

Thanks,

Simeon

That’s the variant used when your elements are in an element array buffer as per the GL_ELEMENT_ARRAY_BUFFER state bit. See the ARB_vertex_buffer_object specification for details. In order to pass in an int array of elements, use IntBuffer.wrap().