56 #include "PostProcessorSobelPlugin.hh" 58 #if QT_VERSION >= 0x050000 59 #include <QOpenGLContext> 66 QString PostProcessorSobelPlugin::checkOpenGL() {
68 #if QT_VERSION < 0x050000 70 QGLFormat::OpenGLVersionFlags flags = QGLFormat::openGLVersionFlags();
71 if ( ! flags.testFlag(QGLFormat::OpenGL_Version_3_0) )
72 return QString(
"Insufficient OpenGL Version! OpenGL 3.0 or higher required");
75 QString glExtensions = QString((
const char*)glGetString(GL_EXTENSIONS));
81 QOpenGLContext* context = QOpenGLContext::currentContext();
85 QSurfaceFormat format = context->format();
87 if ( (format.majorVersion() < 3) ) {
88 return QString(
"Insufficient OpenGL Version! OpenGL 3.0 or higher required");
97 return name() + QString(
": No context available");
QString name()
Return a name for the plugin.