diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-03-21 08:36:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-05 11:45:36 +0300 |
commit | f36de2733965c96117aa9b68053c0fffa805779a (patch) | |
tree | 01c44cb63fd63365a42d354b72305b6d29959104 /source | |
parent | fc78a58337ab1021cd816737f3bbb496b9b4fe23 (diff) |
Fix T47848: Fix regression in sequencer GL render
Own changes in 2.77 broke off-screen render with scene render size doesn't match output.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index d81ef175889..8c2d7877c8c 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -3308,14 +3308,20 @@ ImBuf *ED_view3d_draw_offscreen_imbuf( { RegionView3D *rv3d = ar->regiondata; ImBuf *ibuf; - const bool draw_sky = (alpha_mode == R_ADDSKY) && v3d && (v3d->flag3 & V3D_SHOW_WORLD); - const bool own_ofs = (ofs == NULL); + const bool draw_sky = (alpha_mode == R_ADDSKY); /* view state */ GPUFXSettings fx_settings = v3d->fx_settings; bool is_ortho = false; float winmat[4][4]; + if (ofs && ((GPU_offscreen_width(ofs) != sizex) || (GPU_offscreen_height(ofs) != sizey))) { + /* sizes differ, can't reuse */ + ofs = NULL; + } + + const bool own_ofs = (ofs == NULL); + if (own_ofs) { /* bind */ ofs = GPU_offscreen_create(sizex, sizey, full_samples ? 0 : samples, err_out); |