Closed Tobias1595 closed 6 years ago
Can you specify on which graphics card this error occurs? Internally, one three implementations is used for Framebuffer blitting:
sourceFbo->bind(GL_READ_FRAMEBUFFER);
targetFbo->bind(GL_DRAW_FRAMEBUFFER);
glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, destX0, destY0, destX1, destY1, mask, filter);
2. The direct state access extension, implemented same as the legacy implementation:
```cpp
sourceFbo->bind(GL_READ_FRAMEBUFFER);
targetFbo->bind(GL_DRAW_FRAMEBUFFER);
glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, destX0, destY0, destX1, destY1, mask, filter);
glBlitNamedFramebuffer(sourceFbo->id(), targetFbo->id(), srcX0, srcY0, srcX1, srcY1, destX0, destY0, destX1, destY1, mask, filter);
Only in the last case there is no explicit bind of the framebuffers (but there should be no need as their name is passed as parameters).
There may be a difference between a framebuffer bound to GL_DRAW_FRAMEBUFFER
and GL_FRAMEBUFFER
(which should represent a framebuffer bound to both read and draw target), so this may be a driver bug or I misread some specification.
I'm currently using an nVidia GeForce GTX 1050 Ti, driver version 398.11 By stepping through I can confirm that the 3rd implementation (ARB extension) is used. The full error message (output by globjects) reads
#fatal: error: 0x502, high severity (API)
GL_INVALID_OPERATION error generated. Draw buffer is invalid.
Can you check if the PR https://github.com/cginternals/globjects/pull/371 fixes the issue? I'd prefer this over a fix here.
Prevents fatal error "INVALID_OPERATION: Draw buffer invalid" (even if operation succeeded anyway)