From a145c7dc6202d82f39074a9f63d5809b87594e5e Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 6 Nov 2018 15:46:07 +0100 Subject: [PATCH] Cleanup: No need to save/restor frame buffer twice --- source/blender/python/gpu/gpu_py_offscreen.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index d0ba48b69c5..05e87cb0f53 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -232,8 +232,6 @@ 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, @@ -253,7 +251,6 @@ 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);