diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-23 21:09:25 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-23 21:09:25 +0300 |
commit | 0a89c3954f465c2a528e03c06f28ad9c33ed907d (patch) | |
tree | 83d878ff5d8b55ba580453b76f1ffdf7a9e21dbe /source/blender/editors/space_sequencer/sequencer_draw.c | |
parent | d057dea7ae426e59fcd6c34aba3068a37330daeb (diff) |
Fix T62845 VSE preview crash when setting rendered (EEVEE/Workbench)
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 7d1748f4bb0..2b2935157be 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -952,6 +952,10 @@ ImBuf *sequencer_ibuf_get( */ G.is_break = false; + /* Rendering can change OGL context. Save & Restore framebuffer. */ + GPUFrameBuffer *fb = GPU_framebuffer_active_get(); + GPU_framebuffer_restore(); + if (special_seq_update) ibuf = BKE_sequencer_give_ibuf_direct(&context, cfra + frame_ofs, special_seq_update); else if (!U.prefetchframes) // XXX || (G.f & G_PLAYANIM) == 0) { @@ -959,6 +963,8 @@ ImBuf *sequencer_ibuf_get( else ibuf = BKE_sequencer_give_ibuf_threaded(&context, cfra + frame_ofs, sseq->chanshown); + GPU_framebuffer_bind(fb); + /* restore state so real rendering would be canceled (if needed) */ G.is_break = is_break; |