diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-29 15:03:15 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-30 14:11:03 +0300 |
commit | 0f372f3966c434da5faa8e221f9da2aa48999a61 (patch) | |
tree | 08ed30ca3f78cf767691c7b3575703ce25cfb9ee /source/blender/gpu/opengl/gl_framebuffer.cc | |
parent | bb530a77b638d1ccab779e1f43675030597f995e (diff) |
GPUContext: Update internal framebuffer size when activating context
This is to ensure the FrameBuffer extents are always up to date.
Diffstat (limited to 'source/blender/gpu/opengl/gl_framebuffer.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_framebuffer.cc | 3 |
1 files changed, 1 insertions, 2 deletions
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); } |