so I have managed to draw 2 lines (consisting of 5 smaller 'line segments' each) directly from a VBO, however it connects the two lines when it shouldn't.
So the code for drawing the lines consists of:
self.linelist = np.array([
# LINE 1 #
[ 50., 350., 150., 94.], #Segment 1
[ 150., 94., 250., 392.], #Segment 2
[ 250., 392., 350., 466.], #Segment 3
[ 350., 466., 450., 233.], #Segment 4
[ 450., 233., 550., 420.], #Segment 5
[ 550., 420., 50., 490.], #Joining Segment
# LINE 2 #
[ 50., 490., 150., 94.], #Segment 1
[ 150., 94., 250., 280.], #Segment 2
[ 250., 280., 350., 280.], #Segment 3
[ 350., 280., 450., 419.], #Segment 4
[ 450., 419., 550., 140.] #Segment 5
], dtype=np.float32)
self.linevbo = glvbo.VBO(self.linelist)
self.linevbo.bind()
glEnableClientState(GL_VERTEX_ARRAY)
glVertexPointer(2, GL_FLOAT, 0, self.linevbo)
self.faces = np.array(range((len(self.linelist)*2)), dtype=np.uint32)
glDrawArrays(GL_LINES, 0, len(self.linelist)*2)
glDisableClientState(GL_VERTEX_ARRAY)
How can I stop it from joining the two lines?
EDIT: I think I need to use glMultiDrawArrays but I have no idea how to...