GL: Fix linking errors being useless.

Now they will at least show the shader name
This commit is contained in:
Clément Foucault 2020-09-14 12:45:23 +02:00
parent b34ea1d4ce
commit cfd9c0c199
Notes: blender-bot 2024-02-28 15:42:16 +01:00
Referenced by issue #80380, 2.90 Not opening on Linux
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}