summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-21 15:01:26 +0200
committerSamuel Rødal <sroedal@trolltech.com>2009-09-21 16:37:48 +0200
commitc6d2ec67384d5b0a4f9108277888d4aaf0e2f6d2 (patch)
tree0f2f53e30d81ece164c82203b69933bc21ea4e59
parent01383e6fde102ebeff5f87a90142c6d1cdb44d94 (diff)
Made hellogl example compile when GL_MULTISAMPLE is not defined.
Also let the GL widget have sample buffers, otherwise using GL_MULTISAMPLE won't help much. Reviewed-by: Trond
-rw-r--r--examples/opengl/hellogl/glwidget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/opengl/hellogl/glwidget.cpp b/examples/opengl/hellogl/glwidget.cpp
index b0c3ba40ca..282f21f8cf 100644
--- a/examples/opengl/hellogl/glwidget.cpp
+++ b/examples/opengl/hellogl/glwidget.cpp
@@ -47,9 +47,13 @@
#include "glwidget.h"
#include "qtlogo.h"
+#ifndef GL_MULTISAMPLE
+#define GL_MULTISAMPLE 0x809D
+#endif
+
//! [0]
GLWidget::GLWidget(QWidget *parent)
- : QGLWidget(parent)
+ : QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
{
logo = 0;
xRot = 0;