GLFrameBuffer: Fix mass renaming issue

The context might be partialy freed, so use gpu::Context instead of
GLcontext.
master
Clément 4 years ago
parent 2af70acc3a
commit acdea4e98b

@ -78,8 +78,8 @@ GLFrameBuffer::~GLFrameBuffer()
return;
}
if (context_ == GLContext::get()) {
/* Context might be partially freed. This happens when destroying the window frame-buffers. */
/* Context might be partially freed. This happens when destroying the window frame-buffers. */
if (context_ == Context::get()) {
glDeleteFramebuffers(1, &fbo_id_);
}
else {
@ -89,7 +89,7 @@ GLFrameBuffer::~GLFrameBuffer()
if (context_->active_fb == this && context_->back_left != this) {
/* If this assert triggers it means the frame-buffer is being freed while in use by another
* context which, by the way, is TOTALLY UNSAFE!!! */
BLI_assert(context_ == GLContext::get());
BLI_assert(context_ == Context::get());
GPU_framebuffer_restore();
}
}

Loading…
Cancel
Save