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_api/spacetypes.c')
-rw-r--r--source/blender/editors/space_api/spacetypes.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index b89c8cb2193..10ce7b81954 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -271,18 +271,15 @@ 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;
+
+ /* This is needed until we get rid of BGL which can change the states we are tracking. */
+ GPU_bgl_end();
}
}
- if (has_drawn_something) {
- /* This is needed until we get rid of BGL which can change the states we are tracking. */
- GPU_bgl_end();
- }
}
/* ********************* space template *********************** */