i’m having an array of 40,00,000 vertices with start and end points.while displaying with gldrawarray some stranges line are present which i have not used to draw.i had checked my array values.everything is right.i had tried with small array at that time also its displaying some lines.
i’m having an array of 40,00,000 vertices with start and end points.
Those two statements seem contradictory. GL_LINE_LOOP will draw a single line through all the vertices given, while GL_LINES draws many lines, each from vertex i to i+1.
Did you perhaps mean glDrawArrays(GL_LINES, 0, count) ?
i have tried with small array but still some strange lines are present.i have tried with both GL_LINES and GL_LINE_LOOP but some lines r displaying.i have attached the picture with this
Hm, I’m not sure I understand the problem without the picture (I don’t see it here or a link to it) or a more detailed description of your inputs and the expected and actual output.
Between which vertices are the additional lines?
If your vertices are [v0, v1, v2, v3, v4, v5]
you get with GL_LINES:
line0 v0 to v1
line1 v2 to v3
line2 v4 to v5
with GL_LINE_LOOP:
line0 v0 to v1
line1 v1 to v2 *
line2 v2 to v3
line3 v3 to v4 *
line4 v4 to v5