diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-14 13:45:23 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-14 18:30:25 +0300 |
commit | cfd9c0c199060732e61751708a07db44b1abe6c5 (patch) | |
tree | 7ee0030975470099c28df4a0a413a3f2e3180ab7 /source/blender/gpu | |
parent | b34ea1d4ce3a5602908d3a1c74ef1fea5ba17379 (diff) |
GL: Fix linking errors being useless.
Now they will at least show the shader name
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/opengl/gl_shader.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |