How do you render primitives as wireframes in OpenGL?
+1
A:
From http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/ogladv/tut5
// Turn on wireframe mode
glPolygonMode(GL_FRONT, GL_LINE);
glPolygonMode(GL_BACK, GL_LINE);
// Draw the box
DrawBox();
// Turn off wireframe mode
glPolygonMode(GL_FRONT, GL_FILL);
glPolygonMode(GL_BACK, GL_FILL);
John Millikin
2008-09-26 03:43:37
making two calls is redundant. use GL_FRONT_AND_BACK
shoosh
2008-09-30 09:01:02