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:
parent
18874f1047
commit
8a582f44e1
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user