Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r--source/blender/editors/space_image/space_image.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 3c850ae1689..4f2b0f0db2b 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -83,6 +83,12 @@
#include "image_intern.h"
#include "GPU_framebuffer.h"
+#include "GPU_batch_presets.h"
+#include "GPU_viewport.h"
+
+/* TODO(fclem) remove bad level calls */
+#include "../draw/DRW_engine.h"
+#include "wm_draw.h"
/**************************** common state *****************************/
@@ -620,6 +626,14 @@ static void image_main_region_draw(const bContext *C, ARegion *ar)
//View2DScrollers *scrollers;
float col[3];
+ /* XXX This is in order to draw UI batches with the DRW
+ * olg context since we now use it for drawing the entire area */
+ gpu_batch_presets_reset();
+
+ /* TODO(fclem) port to draw manager and remove the depth buffer allocation. */
+ DefaultFramebufferList *fbl = GPU_viewport_framebuffer_list_get(ar->draw_buffer->viewport[0]);
+ GPU_framebuffer_bind(fbl->color_only_fb);
+
/* XXX not supported yet, disabling for now */
scene->r.scemode &= ~R_COMP_CROP;