OpenGL 3.3 glDrawArrays for triangles

775 Views Asked by At

I have to draw a height map and when I use: glDrawArrays(GL_TRIANGLES, 0, vertexCount); the program draws filled triangles. But I need only contours of triangles(3 lines). I tried almost every mode for glDrawArray (from here) but there isn't appropriate solution. Of course I can draw three lines for each triangle. But maybe is it possible to draw empty triangles in the better way?

1

There are 1 best solutions below

0
On BEST ANSWER

Try changing glPolygonMode to GL_LINE, that should do the trick.