We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b7bd7d commit aaffdd7Copy full SHA for aaffdd7
src/ruis/render/opengl/frame_buffer.cpp
@@ -96,6 +96,10 @@ frame_buffer::frame_buffer(
96
97
frame_buffer::~frame_buffer()
98
{
99
- glDeleteFramebuffers(1, &this->fbo);
100
- assert_opengl_no_error();
+ // In OpenGL framebuffer objects are not shared between contexts,
+ // so make sure the owning context is bound when deleting the framebuffer object.
101
+ this->rendering_context.get().apply([this]() {
102
+ glDeleteFramebuffers(1, &this->fbo);
103
+ assert_opengl_no_error();
104
+ });
105
}
0 commit comments