From 482e5e88d5e0eae4ce8bb34ffbe36513bc367be7 Mon Sep 17 00:00:00 2001 From: DronCode Date: Sat, 7 Oct 2023 20:58:38 +0300 Subject: [PATCH] Another fix --- BMEdit/Editor/Source/Widgets/SceneRenderWidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BMEdit/Editor/Source/Widgets/SceneRenderWidget.cpp b/BMEdit/Editor/Source/Widgets/SceneRenderWidget.cpp index 0cc8143..3bbc4ca 100644 --- a/BMEdit/Editor/Source/Widgets/SceneRenderWidget.cpp +++ b/BMEdit/Editor/Source/Widgets/SceneRenderWidget.cpp @@ -162,8 +162,9 @@ namespace widgets GLint length { 0 }; gapi->glGetProgramInfoLog(programId, kCompileLogSize, &length, &linkLog[0]); + error = std::string(&linkLog[0], length); - qDebug() << "Failed to link shader program: " << std::string(&linkLog[0], length); + qDebug() << "Failed to link shader program: " << QString::fromStdString(error); assert(false); return false; @@ -270,9 +271,10 @@ namespace widgets GLint length { 0 }; gapi->glGetShaderInfoLog(unitId, kCompileLogSize, &length, &compileLog[0]); - qDebug() << "Failed to compile shader program: " << std::string(&compileLog[0], length); error = std::string(&compileLog[0], length); + qDebug() << "Failed to compile shader program: " << QString::fromStdString(error); + assert(false && "Failed to compile unit!"); return false; }