Commit 3cb2d073 authored by Christopher Tenter's avatar Christopher Tenter

replace qt opengl checks with ACG refs #2529

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@21133 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3fead00f
......@@ -58,13 +58,6 @@
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/common/GlobalOptions.hh>
#if QT_VERSION >= 0x050000
#include <QOpenGLContext>
#include <QSurfaceFormat>
#else
#include <QGLFormat>
#endif
PostProcessorAnaglyphPlugin::PostProcessorAnaglyphPlugin()
{
......@@ -75,41 +68,10 @@ PostProcessorAnaglyphPlugin::~PostProcessorAnaglyphPlugin()
}
QString PostProcessorAnaglyphPlugin::checkOpenGL() {
#if QT_VERSION < 0x050000
QGLFormat::OpenGLVersionFlags flags = QGLFormat::openGLVersionFlags();
if ( ! flags.testFlag(QGLFormat::OpenGL_Version_3_0) )
if (!ACG::openGLVersion(3, 0))
return QString("Insufficient OpenGL Version! OpenGL 3.0 or higher required");
// Check extensions
QString glExtensions = QString((const char*)glGetString(GL_EXTENSIONS));
QString missing("");
return missing;
#else
QOpenGLContext* context = QOpenGLContext::currentContext();
if ( context ) {
// Get version and check
QSurfaceFormat format = context->format();
if ( (format.majorVersion() < 3) ) {
return QString("Insufficient OpenGL Version! OpenGL 3.0 or higher required");
}
// Check extensions
QString missing("");
return missing;
} else {
return name() + QString(": No context available");
}
#endif
return QString("");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment