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
This commit is contained in:
parent
69e567cfe8
commit
1b9d9cb1ed
@ -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 *********************** */
|
||||
|
Loading…
Reference in New Issue
Block a user