[Bf-blender-cvs] [cfd9c0c1990] master: GL: Fix linking errors being useless.
Clément Foucault
noreply at git.blender.org
Mon Sep 14 17:31:06 CEST 2020
Commit: cfd9c0c199060732e61751708a07db44b1abe6c5
Author: Clément Foucault
Date: Mon Sep 14 12:45:23 2020 +0200
Branches: master
https://developer.blender.org/rBcfd9c0c199060732e61751708a07db44b1abe6c5
GL: Fix linking errors being useless.
Now they will at least show the shader name
===================================================================
M source/blender/gpu/opengl/gl_shader.cc
===================================================================
diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc
index c400f218f5a..efe656bb387 100644
--- a/source/blender/gpu/opengl/gl_shader.cc
+++ b/source/blender/gpu/opengl/gl_shader.cc
@@ -24,6 +24,7 @@
#include "BKE_global.h"
#include "BLI_string.h"
+#include "BLI_vector.hh"
#include "GPU_platform.h"
@@ -184,7 +185,8 @@ bool GLShader::finalize(void)
if (!status) {
char log[5000];
glGetProgramInfoLog(shader_program_, sizeof(log), NULL, log);
- fprintf(stderr, "\nLinking Error:\n\n%s", log);
+ Vector<const char *> sources(0);
+ this->print_errors(sources, log, "Linking");
return false;
}
More information about the Bf-blender-cvs
mailing list