From acdea4e98bc7a909558a4f7efacf11a0b6d8e147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Tue, 8 Sep 2020 15:49:16 +0200 Subject: GLFrameBuffer: Fix mass renaming issue The context might be partialy freed, so use gpu::Context instead of GLcontext. --- source/blender/gpu/opengl/gl_framebuffer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '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(); } } -- cgit v1.2.3