GL: Improve framebuffer error message by adding framebuffer name

Framebuffer error can be hard to track. This makes it much easier to
find the wrong framebuffer configuration.
This commit is contained in:
Clément Foucault 2021-02-03 17:09:35 +01:00
parent f4f4495586
commit e49b702527
1 changed files with 3 additions and 3 deletions

View File

@ -142,13 +142,13 @@ bool GLFrameBuffer::check(char err_out[256])
#undef FORMAT_STATUS
const char *format = "GPUFrameBuffer: frame-buffer status %s\n";
const char *format = "GPUFrameBuffer: %s status %s\n";
if (err_out) {
BLI_snprintf(err_out, 256, format, err);
BLI_snprintf(err_out, 256, format, this->name_, err);
}
else {
fprintf(stderr, format, err);
fprintf(stderr, format, this->name_, err);
}
return false;