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.
This commit is contained in:
Campbell Barton 2016-03-21 16:36:20 +11:00
parent fb5c6333f9
commit f4840e878b
Notes: blender-bot 2023-02-14 08:05:23 +01:00
Referenced by issue #47848, OpenGL Render animation wrong in sequencer with scenes with different resolutions
1 changed files with 7 additions and 1 deletions

View File

@ -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);