diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 622e8359541..bfc155dce16 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -52,7 +52,6 @@ #include "ED_view3d.h" #include "GPU_context.h" -#include "GPU_draw.h" #include "GPU_framebuffer.h" #include "GPU_immediate.h" #include "GPU_state.h" @@ -208,7 +207,7 @@ static bool wm_draw_region_stereo_set(Main *bmain, if (region->regiontype == RGN_TYPE_PREVIEW) { return true; } - else if (region->regiontype == RGN_TYPE_WINDOW) { + if (region->regiontype == RGN_TYPE_WINDOW) { return (sseq->draw_flag & SEQ_DRAW_BACKDROP) != 0; } } @@ -523,9 +522,7 @@ GPUTexture *wm_draw_region_texture(ARegion *region, int view) if (viewport) { return GPU_viewport_color_texture(viewport, view); } - else { - return GPU_offscreen_color_texture(region->draw_buffer->offscreen); - } + return GPU_offscreen_color_texture(region->draw_buffer->offscreen); } void wm_draw_region_blend(ARegion *region, int view, bool blend) @@ -575,8 +572,8 @@ void wm_draw_region_blend(ARegion *region, int view, bool blend) } /* Not the same layout as rectf/recti. */ - float rectt[4] = {rect_tex.xmin, rect_tex.ymin, rect_tex.xmax, rect_tex.ymax}; - float rectg[4] = {rect_geo.xmin, rect_geo.ymin, rect_geo.xmax, rect_geo.ymax}; + const float rectt[4] = {rect_tex.xmin, rect_tex.ymin, rect_tex.xmax, rect_tex.ymax}; + const float rectg[4] = {rect_geo.xmin, rect_geo.ymin, rect_geo.xmax, rect_geo.ymax}; if (blend) { /* GL_ONE because regions drawn offscreen have premultiplied alpha. */ @@ -1003,7 +1000,7 @@ void wm_draw_update(bContext *C) wmWindow *win; GPU_context_main_lock(); - GPU_free_unused_buffers(); + BKE_image_free_unused_gpu_textures(); for (win = wm->windows.first; win; win = win->next) { #ifdef WIN32 |