I'm developing with OpenGL 4.1 and have good understanding of the modern pipeline. I was thinking on doing it with GL_LINE_LOOP for each face, but I think this will require several draw calls which certainly is not optimal. What could be a better approach?
Asked
Active
Viewed 2,188 times
1 Answers
5
Things like that are usually done using an index buffer. The idea is that you have you have two buffers: One for all the vertices and one that determines the topology of what to draw. Then you can draw all the lines at once with a single glDrawElements call, using GL_LINES as mode.

Wumpf
- 853
- 7
- 15
-
Amazing, just finished implementing it and Element Buffers are the way to go. – BRabbit27 Oct 28 '15 at 16:46