1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

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
This commit is contained in:
edouard 2010-06-29 09:46:40 +00:00 committed by edouard
parent 18874f1047
commit 8a582f44e1

View File

@ -29,7 +29,8 @@
#include <iostream>
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();