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:
authorClément Foucault <foucault.clem@gmail.com>2018-05-03 12:20:10 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-03 12:20:20 +0300
commit8431e0aab55a597cb3141e02c0d4e03f9fb027c6 (patch)
treecca075a026302903fbf8e78a7b60e124cab2a386
parent026792ffed8ad7fb27ef877af75a06136d13a438 (diff)
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.
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c5
1 files changed, 5 insertions, 0 deletions
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);