fix "Modern Viewport" regression
GPU_viewport_bind & unbind should be called as pairs. A recent commit -- 3b91989a09
-- called unbind only for some code paths, overflowing OpenGL's matrix & attrib stacks.
This commit is contained in:
parent
b4157dedb0
commit
ac276e1541
|
@ -1522,9 +1522,6 @@ void DRW_draw_view(const bContext *C)
|
|||
|
||||
DRW_state_reset();
|
||||
DRW_engines_disable();
|
||||
|
||||
/* Unbind fbo and draw result */
|
||||
GPU_viewport_unbind(DST.viewport);
|
||||
}
|
||||
|
||||
/* ****************************************** OTHER ***************************************** */
|
||||
|
|
|
@ -2369,6 +2369,8 @@ void view3d_main_region_draw(const bContext *C, ARegion *ar)
|
|||
else
|
||||
view3d_draw_view(C, ar, &draw_data);
|
||||
|
||||
GPU_viewport_unbind(rv3d->viewport);
|
||||
|
||||
v3d->flag |= V3D_INVALID_BACKBUF;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue