Commit cb72d9dc authored by Julian Thijssen's avatar Julian Thijssen

Print shader error log on non-debug builds as well

parent 8891dcd0
......@@ -72,7 +72,7 @@ KisShaderProgram *KisOpenGLShaderLoader::loadShader(QString vertPath, QString fr
result = shader->addShaderFromSourceCode(QOpenGLShader::Vertex, vertSource);
if (!result)
throw ShaderLoaderException(QString("Failed to add vertex shader source from file: ").append(vertPath));
throw ShaderLoaderException(QString("%1: %2 - Cause: %3").arg("Failed to add vertex shader source from file", vertPath, shader->log()));
// Load fragment shader
QByteArray fragSource;
......@@ -90,7 +90,7 @@ KisShaderProgram *KisOpenGLShaderLoader::loadShader(QString vertPath, QString fr
result = shader->addShaderFromSourceCode(QOpenGLShader::Fragment, fragSource);
if (!result)
throw ShaderLoaderException(QString("Failed to add fragment shader source from file: ").append(fragPath));
throw ShaderLoaderException(QString("%1: %2 - Cause: %3").arg("Failed to add fragment shader source from file", fragPath, shader->log()));
// Bind attributes
shader->bindAttributeLocation("a_vertexPosition", PROGRAM_VERTEX_ATTRIBUTE);
......
......@@ -71,7 +71,7 @@ private:
*/
class ShaderLoaderException : public std::runtime_error {
public:
ShaderLoaderException(QString error) : std::runtime_error(error.toLatin1().data()) { }
ShaderLoaderException(QString error) : std::runtime_error(error.toStdString()) { }
};
/**
......
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