Tue, 22 Oct 2013 21:03:57 +0300
added a configuration option for line anti-aliasing
changelog.txt | file | annotate | diff | comparison | revisions | |
src/configDialog.cpp | file | annotate | diff | comparison | revisions | |
src/gldraw.cpp | file | annotate | diff | comparison | revisions | |
ui/config.ui | file | annotate | diff | comparison | revisions |
--- 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.
--- 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);
--- 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); + } } // =============================================================================
--- 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 @@ </widget> </item> <item> - <widget class="QCheckBox" name="implicitFiles"> + <widget class="QCheckBox" name="m_aa"> <property name="text"> - <string>List implicitly loaded files</string> + <string>Anti-aliased lines</string> </property> </widget> </item> @@ -267,6 +267,13 @@ </widget> </item> <item> + <widget class="QCheckBox" name="implicitFiles"> + <property name="text"> + <string>List implicitly loaded files</string> + </property> + </widget> + </item> + <item> <spacer name="verticalSpacer_6"> <property name="orientation"> <enum>Qt::Vertical</enum>