diff options
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 1799fc10c76..ac0dbba1606 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -75,11 +75,10 @@ #include "GPU_batch_presets.h" #include "GPU_framebuffer.h" #include "GPU_viewport.h" -#include "image_intern.h" -/* TODO(fclem) remove bad level calls */ -#include "../draw/DRW_engine.h" -#include "wm_draw.h" +#include "DRW_engine_types.h" + +#include "image_intern.h" /**************************** common state *****************************/ @@ -644,14 +643,17 @@ static void image_main_region_draw(const bContext *C, ARegion *region) float col[3]; GPU_batch_presets_reset(); + GPUViewport *viewport = WM_draw_region_get_viewport(region); + GPUFrameBuffer *framebuffer_default, *framebuffer_overlay; + + framebuffer_default = GPU_viewport_framebuffer_default_get(viewport); + framebuffer_overlay = GPU_viewport_framebuffer_overlay_get(viewport); - GPUViewport *viewport = region->draw_buffer->viewport; - DefaultFramebufferList *fbl = GPU_viewport_framebuffer_list_get(viewport); - GPU_framebuffer_bind(fbl->default_fb); + GPU_framebuffer_bind(framebuffer_default); GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f); GPU_clear(GPU_COLOR_BIT); - GPU_framebuffer_bind(fbl->overlay_fb); + GPU_framebuffer_bind(framebuffer_overlay); /* XXX not supported yet, disabling for now */ scene->r.scemode &= ~R_COMP_CROP; |