[Bf-blender-cvs] [8431e0aab55] blender2.8: UI: Fix region_draw_azone_tab_plus missing/broken background.

Clément Foucault noreply at git.blender.org
Thu May 3 11:20:22 CEST 2018


Commit: 8431e0aab55a597cb3141e02c0d4e03f9fb027c6
Author: Clément Foucault
Date:   Thu May 3 11:20:10 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB8431e0aab55a597cb3141e02c0d4e03f9fb027c6

UI: Fix region_draw_azone_tab_plus missing/broken background.

This was due to the background being drawn by a batch that had its VAO
generated in the windows "UI" context.

Since we use the DRW ogl context to draw the entire area, we have to
regenerate the VAO for thoses UI batches to be drawn correctly.

===================================================================

M	source/blender/editors/space_view3d/view3d_draw.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 01ce3ae65c5..99f7abba065 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -72,6 +72,7 @@
 
 #include "DEG_depsgraph_query.h"
 
+#include "GPU_batch.h"
 #include "GPU_draw.h"
 #include "GPU_matrix.h"
 #include "GPU_immediate.h"
@@ -1265,6 +1266,10 @@ void view3d_main_region_draw(const bContext *C, ARegion *ar)
 	GPU_free_images_old();
 	GPU_pass_cache_garbage_collect();
 
+	/* 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();
+
 	/* No depth test for drawing action zones afterwards. */
 	glDisable(GL_DEPTH_TEST);



More information about the Bf-blender-cvs mailing list