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:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-11-05 23:14:09 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-11-06 00:34:47 +0300
commit1b9d9cb1ed7019e05b11cc480aef75a10e952957 (patch)
tree99e060d79c6abac31b1e5b34c3618df87656d7f0
parent69e567cfe85c5c6def1f2d3d72016a7e76281418 (diff)
Fix T82164: Knife tool draws huge vertices after using bgl.glPointSize
Since it is possible to have multiple draw callbacks, (some of which use bgl and others gpu), check and force the reset of the drawing status at the end of each callback. Differential Revision: https://developer.blender.org/D9476
-rw-r--r--source/blender/editors/space_api/spacetypes.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index b89c8cb2193..40c83607f2c 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -276,13 +276,11 @@ void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
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 *********************** */