I’m using glDrawArrays to draw a bunch of line loops, but how do I specify where the line loops begin and end? For example, I have a bunch of coordinates: c1, c2, c3, c4, c5, c6…
And I want line loops to close c1, c2, c3, then another line loop for c4, c5, c6.
I tried something like (note these are the JOGL bindings, so it is Java syntax):
gl.glVertexPointer(3, GL.GL_DOUBLE, 0, buff);
gl.glDrawArrays(GL.GL_LINE_LOOP, 0, count);
but I don’t know how to specify the indices of the line loops. I looked into glDrawElements, but I’m not sure if that’s correct either…
Thanks,
Jeff