# HG changeset patch # User Santeri Piippo # Date 1382465037 -10800 # Node ID c294b2070185aa412e1ba339122101b6b0dcd4e2 # Parent e38d199ef9aa9e2e33553a913845f4b354e7b643 added a configuration option for line anti-aliasing diff -r e38d199ef9aa -r c294b2070185 changelog.txt --- a/changelog.txt Tue Oct 22 19:33:41 2013 +0300 +++ b/changelog.txt Tue Oct 22 21:03:57 2013 +0300 @@ -29,6 +29,7 @@ with an input dialog instead of being told to go to configuration to set the path. - When adding edges with Intersector (which is done with Isecalc), the user is prompted for Isecalc's path now as well if necessary instead of just ignoring it and not adding the edgelines. +- Added a configuration option for line anti-aliasing. - BFC red/green view and black edges no longer default to true. - If the vertex snapper finds a vertex closer than 4 pixels, it likely is the vertex being looked for and the algorithm can terminate early, hopefully this will save a few cycles on large parts. diff -r e38d199ef9aa -r c294b2070185 src/configDialog.cpp --- a/src/configDialog.cpp Tue Oct 22 19:33:41 2013 +0300 +++ b/src/configDialog.cpp Tue Oct 22 21:03:57 2013 +0300 @@ -49,6 +49,7 @@ extern_cfg (String, gui_colortoolbar); extern_cfg (Bool, edit_schemanticinline); extern_cfg (Bool, gl_blackedges); +extern_cfg (Bool, gl_aa); extern_cfg (Bool, gui_implicitfiles); extern_cfg (String, net_downloadpath); extern_cfg (Bool, net_guesspaths); @@ -103,6 +104,7 @@ ui->colorizeObjects->setChecked (lv_colorize); ui->colorBFC->setChecked (gl_colorbfc); ui->blackEdges->setChecked (gl_blackedges); + ui->m_aa->setChecked (gl_aa); ui->implicitFiles->setChecked (gui_implicitfiles); ui->m_logostuds->setChecked (gl_logostuds); @@ -306,6 +308,7 @@ ld_defaultuser = ui->m_profileUsername->text(); ld_defaultname = ui->m_profileName->text(); ld_defaultlicense = ui->m_profileLicense->currentIndex(); + gl_aa = ui->m_aa->isChecked(); // Rebuild the quick color toolbar g_win->setQuickColors (quickColors); diff -r e38d199ef9aa -r c294b2070185 src/gldraw.cpp --- a/src/gldraw.cpp Tue Oct 22 19:33:41 2013 +0300 +++ b/src/gldraw.cpp Tue Oct 22 21:03:57 2013 +0300 @@ -64,6 +64,7 @@ cfg (Bool, gl_axes, false); cfg (Bool, gl_wireframe, false); cfg (Bool, gl_logostuds, false); +cfg (Bool, gl_aa, true); // argh const char* g_CameraNames[7] = @@ -185,8 +186,15 @@ glShadeModel (GL_SMOOTH); glEnable (GL_MULTISAMPLE); - glEnable (GL_LINE_SMOOTH); - glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); + if (gl_aa) + { glEnable (GL_LINE_SMOOTH); + glEnable (GL_POLYGON_SMOOTH); + glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); + glHint (GL_POLYGON_SMOOTH_HINT, GL_NICEST); + } else + { glDisable (GL_LINE_SMOOTH); + glDisable (GL_POLYGON_SMOOTH); + } } // ============================================================================= diff -r e38d199ef9aa -r c294b2070185 ui/config.ui --- a/ui/config.ui Tue Oct 22 19:33:41 2013 +0300 +++ b/ui/config.ui Tue Oct 22 21:03:57 2013 +0300 @@ -249,9 +249,9 @@ - + - List implicitly loaded files + Anti-aliased lines @@ -267,6 +267,13 @@ + + + List implicitly loaded files + + + + Qt::Vertical