src/gldraw.cpp

changeset 193
ce8e25ccbaf6
parent 192
c414924a647c
child 194
cfe9ae5f1124
--- a/src/gldraw.cpp	Sun May 12 20:21:44 2013 +0300
+++ b/src/gldraw.cpp	Mon May 13 00:04:54 2013 +0300
@@ -52,6 +52,7 @@
 cfg (int, gl_camera, GLRenderer::Free);
 cfg (bool, gl_blackedges, true);
 cfg (bool, gl_axes, false);
+cfg (bool, gl_wireframe, false);
 
 // CameraIcon::img is a heap-allocated QPixmap because otherwise it gets
 // initialized before program gets to main() and constructs a QApplication
@@ -316,6 +317,9 @@
 	if (g_curfile == null)
 		return;
 	
+	if (gl_wireframe && !picking ())
+		glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
+	
 	glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 	glEnable (GL_DEPTH_TEST);
 	
@@ -376,6 +380,7 @@
 	
 	glPopMatrix ();
 	glMatrixMode (GL_MODELVIEW);
+	glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
 }
 
 // =============================================================================

mercurial