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:
authorHans Goudey <h.goudey@me.com>2020-09-13 01:42:27 +0300
committerHans Goudey <h.goudey@me.com>2020-09-13 01:42:27 +0300
commit3eaca737531a917e60350bd74d52849b612831da (patch)
tree8950b659cbafcaa55e4ebfee64999a2fc382a606 /source/blender/editors/space_api
parent5545d833154e017f3948db9970b8d770ea8e8f9b (diff)
parent8f6740b2754ff1f5c936ee95e2cd7ed837627608 (diff)
Merge branch 'property-search-single-tab' into property-search-start-end-operators
Diffstat (limited to 'source/blender/editors/space_api')
-rw-r--r--source/blender/editors/space_api/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_api/spacetypes.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_api/CMakeLists.txt b/source/blender/editors/space_api/CMakeLists.txt
index d948d84f1c3..573afb76f0e 100644
--- a/source/blender/editors/space_api/CMakeLists.txt
+++ b/source/blender/editors/space_api/CMakeLists.txt
@@ -20,6 +20,7 @@ set(INC
../io
../../blenkernel
../../blenlib
+ ../../gpu
../../makesdna
../../makesrna
../../windowmanager
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 29ad314cd65..2a18ffafc6c 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -33,6 +33,8 @@
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "GPU_state.h"
+
#include "UI_interface.h"
#include "UI_view2d.h"
@@ -269,12 +271,18 @@ void ED_region_draw_cb_exit(ARegionType *art, void *handle)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
{
RegionDrawCB *rdc;
+ bool has_drawn_something = false;
for (rdc = region->type->drawcalls.first; rdc; rdc = rdc->next) {
if (rdc->type == type) {
rdc->draw(C, region, rdc->customdata);
+ has_drawn_something = true;
}
}
+ if (has_drawn_something) {
+ /* This is needed until we get rid of BGL which can change the states we are tracking. */
+ GPU_force_state();
+ }
}
/* ********************* space template *********************** */