diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-13 20:18:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-13 22:02:31 +0300 |
commit | 6e040b045ab1d94a877ab6f72f431c9b64e1121c (patch) | |
tree | 0c2ac27d592da617eccb911d32d65c565c7186ca /source/blender/editors/space_view3d/view3d_draw.c | |
parent | e9b1163162d78324c118d3649451e81644b1af03 (diff) |
GPU: add offscreen buffer drawing utility functions.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index f96dead513c..c3a42cc0cad 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1918,6 +1918,10 @@ void view3d_main_region_draw(const bContext *C, ARegion *ar) view3d_draw_view(C, ar); GPU_viewport_unbind(rv3d->viewport); + rcti rect = ar->winrct; + BLI_rcti_translate(&rect, -ar->winrct.xmin, -ar->winrct.ymin); + GPU_viewport_draw_to_screen(rv3d->viewport, &rect); + v3d->flag |= V3D_INVALID_BACKBUF; } @@ -2130,7 +2134,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf( if (own_ofs) { /* bind */ - ofs = GPU_offscreen_create(sizex, sizey, use_full_sample ? 0 : samples, false, err_out); + ofs = GPU_offscreen_create(sizex, sizey, use_full_sample ? 0 : samples, true, false, err_out); if (ofs == NULL) { return NULL; } |