From 8a582f44e1387490362d0d38603d253e7b679bf2 Mon Sep 17 00:00:00 2001 From: edouard Date: Tue, 29 Jun 2010 09:46:40 +0000 Subject: [PATCH] Attempt at enabling antialiasing on the modelview widget. Since my GPU is really low end, I don't see a difference but YMMV - in which case please comment. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@934 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/modelview/modelviewgadgetwidget.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ground/src/plugins/modelview/modelviewgadgetwidget.cpp b/ground/src/plugins/modelview/modelviewgadgetwidget.cpp index 9862358af..0a16fc76b 100644 --- a/ground/src/plugins/modelview/modelviewgadgetwidget.cpp +++ b/ground/src/plugins/modelview/modelviewgadgetwidget.cpp @@ -29,7 +29,8 @@ #include ModelViewGadgetWidget::ModelViewGadgetWidget(QWidget *parent) -: QGLWidget(parent) + : QGLWidget(QGLFormat(QGL::SampleBuffers),parent) +// : QGLWidget(parent) , m_pFactory(GLC_Factory::instance(this->context())) , m_Light() , m_World() @@ -88,6 +89,8 @@ void ModelViewGadgetWidget::initializeGL() // Calculate camera depth of view m_GlView.setDistMinAndMax(m_World.boundingBox()); glEnable(GL_NORMALIZE); + // Enable antialiasing + glEnable(GL_MULTISAMPLE); m_MotionTimer.start(100); } @@ -105,6 +108,9 @@ void ModelViewGadgetWidget::paintGL() // Load identity matrix glLoadIdentity(); + // Enable antialiasing + glEnable(GL_MULTISAMPLE); + // define the light m_Light.enable();