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:
authorCampbell Barton <ideasman42@gmail.com>2016-03-21 08:36:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-03-21 08:36:20 +0300
commitf4840e878b95e87d60a8b66fad9a5777ce380dc5 (patch)
tree921c0093ecb53cec13e2534d8c0f0c7d2a7d0ae1 /source/blender/editors/space_view3d
parentfb5c6333f9aa8f05b030262d321e0233a034ab8a (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/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 4d7cc28ca3f..8c2d7877c8c 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3309,13 +3309,19 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(
RegionView3D *rv3d = ar->regiondata;
ImBuf *ibuf;
const bool draw_sky = (alpha_mode == R_ADDSKY);
- const bool own_ofs = (ofs == NULL);
/* 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);