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:
-rw-r--r--source/blender/python/gpu/gpu_py_offscreen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index fc1bc274845..866a98bbb9f 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -227,6 +227,8 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *a
rv3d_mats = ED_view3d_mats_rv3d_backup(ar->regiondata);
+ GPUFrameBuffer *active = GPU_framebuffer_active_get();
+
GPU_offscreen_bind(self->ofs, true); /* bind */
ED_view3d_draw_offscreen(depsgraph,
@@ -246,6 +248,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *a
NULL);
GPU_offscreen_unbind(self->ofs, true); /* unbind */
+ GPU_framebuffer_bind(active);
ED_view3d_mats_rv3d_restore(ar->regiondata, rv3d_mats);
MEM_freeN(rv3d_mats);