[Bf-blender-cvs] [acdea4e98bc] master: GLFrameBuffer: Fix mass renaming issue
Clément
noreply at git.blender.org
Tue Sep 8 16:14:56 CEST 2020
Commit: acdea4e98bc7a909558a4f7efacf11a0b6d8e147
Author: Clément
Date: Tue Sep 8 15:49:16 2020 +0200
Branches: master
https://developer.blender.org/rBacdea4e98bc7a909558a4f7efacf11a0b6d8e147
GLFrameBuffer: Fix mass renaming issue
The context might be partialy freed, so use gpu::Context instead of
GLcontext.
===================================================================
M source/blender/gpu/opengl/gl_framebuffer.cc
===================================================================
diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc
index 85fa973daff..14b7d78c2ff 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.cc
+++ b/source/blender/gpu/opengl/gl_framebuffer.cc
@@ -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();
}
}
More information about the Bf-blender-cvs
mailing list