Commit 8891dcd0 authored by Julian Thijssen's avatar Julian Thijssen

Load different QOpenGLFunctions if we are on OpenGL 3.0

parent 2c4e90e4
......@@ -30,6 +30,7 @@
#include <opengl/kis_opengl.h>
#include <QOpenGLContext>
#include <QOpenGLFunctions_3_2_Core>
#include <QOpenGLFunctions_3_0>
#include <QOpenGLFunctions_2_0>
......@@ -266,9 +267,14 @@ void OcioDisplayFilter::updateProcessor()
void OcioDisplayFilter::updateShader()
{
if (KisOpenGL::supportsLoD()) {
if (KisOpenGL::hasOpenGL3()) {
QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
updateShaderImpl(f);
}
// XXX This option can be removed once we move to Qt 5.7+
else if (KisOpenGL::supportsLoD()) {
QOpenGLFunctions_3_0 *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_0>();
updateShaderImpl(f);
} else {
QOpenGLFunctions_2_0 *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_2_0>();
updateShaderImpl(f);
......
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