GL: Fix linking errors being useless.

Now they will at least show the shader name
This commit is contained in:
2020-09-14 12:45:23 +02:00
parent b34ea1d4ce
commit cfd9c0c199

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