From c213f287b15d26a38335c96884c2497f9015973a Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 2 Mar 2022 14:45:28 +0600 Subject: [PATCH] qt: Fix loading of shaders using GL_ARB_shading_language_420pack extension --- src/qt/qt_opengloptions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_opengloptions.cpp b/src/qt/qt_opengloptions.cpp index 26b8f05fe..95f13f2df 100644 --- a/src/qt/qt_opengloptions.cpp +++ b/src/qt/qt_opengloptions.cpp @@ -183,10 +183,10 @@ OpenGLOptions::addShader(const QString &path) .toStdString()); }; - if (!shader->addShaderFromSourceCode(QOpenGLShader::Vertex, version_line % "\n#define VERTEX\n" % shader_text)) + if (!shader->addShaderFromSourceCode(QOpenGLShader::Vertex, version_line % "\n#extension GL_ARB_shading_language_420pack : enable\n" % "\n#define VERTEX\n" % shader_text)) throw_shader_error(tr("Error compiling vertex shader in file \"%1\"")); - if (!shader->addShaderFromSourceCode(QOpenGLShader::Fragment, version_line % "\n#define FRAGMENT\n" % shader_text)) + if (!shader->addShaderFromSourceCode(QOpenGLShader::Fragment, version_line % "\n#extension GL_ARB_shading_language_420pack : enable\n" "\n#define FRAGMENT\n" % shader_text)) throw_shader_error(tr("Error compiling fragment shader in file \"%1\"")); if (!shader->link())