0

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?

Denis
  • 719
  • 2
  • 8
  • 23
  • (Solution by martin_pr is better) you could also use [line strips](http://stackoverflow.com/questions/17554669/how-to-draw-connected-strip-lines-in-opengl-like-this) – BeyelerStudios Nov 24 '14 at 18:06
  • possible duplicate of [How do you render primitives as wireframes in OpenGL?](http://stackoverflow.com/questions/137629/how-do-you-render-primitives-as-wireframes-in-opengl) – Reto Koradi Nov 25 '14 at 03:47

1 Answers1

3

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

Martin Prazak
  • 1,476
  • 12
  • 20