Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-29 15:03:15 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-30 14:11:03 +0300
commit0f372f3966c434da5faa8e221f9da2aa48999a61 (patch)
tree08ed30ca3f78cf767691c7b3575703ce25cfb9ee /source/blender/gpu/intern/gpu_framebuffer_private.hh
parentbb530a77b638d1ccab779e1f43675030597f995e (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/intern/gpu_framebuffer_private.hh')
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer_private.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer_private.hh b/source/blender/gpu/intern/gpu_framebuffer_private.hh
index 93551b0ef8b..a34fe38a267 100644
--- a/source/blender/gpu/intern/gpu_framebuffer_private.hh
+++ b/source/blender/gpu/intern/gpu_framebuffer_private.hh
@@ -130,6 +130,12 @@ class FrameBuffer {
void (*callback)(void *userData, int level),
void *userData);
+ inline void size_set(int width, int height)
+ {
+ width_ = width;
+ height_ = height;
+ }
+
inline GPUTexture *depth_tex(void) const
{
if (attachments_[GPU_FB_DEPTH_ATTACHMENT].tex) {