From 0f372f3966c434da5faa8e221f9da2aa48999a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sat, 29 Aug 2020 14:03:15 +0200 Subject: GPUContext: Update internal framebuffer size when activating context This is to ensure the FrameBuffer extents are always up to date. --- source/blender/gpu/opengl/gl_framebuffer.cc | 3 +-- 1 file changed, 1 insertion(+), 2 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 bf2a782b083..7e50d37928e 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -214,8 +214,7 @@ void GLFrameBuffer::update_attachments(void) GPUAttachment &attach = attachments_[first_attachment]; int size[3]; GPU_texture_get_mipmap_size(attach.tex, attach.mip, size); - width_ = size[0]; - height_ = size[1]; + this->size_set(size[0], size[1]); srgb_ = (GPU_texture_format(attach.tex) == GPU_SRGB8_A8); } -- cgit v1.2.3