From 401554dc8fb78e1d8c0c92b271638608c8a35fc7 Mon Sep 17 00:00:00 2001 From: Oliver Bock <oliver.bock@aei.mpg.de> Date: Tue, 2 Dec 2008 15:52:53 +0100 Subject: [PATCH] Added multisampling support * Only when available of course * Uses highest number of buffers by default --- src/pulsaranimationwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pulsaranimationwidget.cpp b/src/pulsaranimationwidget.cpp index 3818c59..291465a 100644 --- a/src/pulsaranimationwidget.cpp +++ b/src/pulsaranimationwidget.cpp @@ -23,7 +23,7 @@ const float PulsarAnimationWidget::deg2rad = PI/180.0f; PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : - QGLWidget(QGLFormat(QGL::AlphaChannel), parent), + QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers), parent), m_frameTimer() { if(!format().rgba()) { @@ -32,6 +32,9 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) : if(!format().alpha()) { qWarning("Sorry, no alpha channel support..."); } + if(!format().sampleBuffers()) { + qWarning("Sorry, no multisampling support..."); + } connect(&m_frameTimer, SIGNAL(timeout()), this, SLOT(updateFrame())); -- GitLab