Fix T102052 GPencil: stroke outline glitches in object mode
Was caused by an extra point per stroke being drawn.
This commit is contained in:
@@ -234,8 +234,8 @@ static void gpencil_stroke_cache_populate(bGPDlayer * /*gpl*/,
|
||||
|
||||
if (show_stroke) {
|
||||
int vfirst = gps->runtime.stroke_start * 3;
|
||||
/* Include "potential" cyclic vertex (see shader). */
|
||||
int vcount = (gps->totpoints + 1) * 2 * 3;
|
||||
bool is_cyclic = ((gps->flag & GP_STROKE_CYCLIC) != 0) && (gps->totpoints > 2);
|
||||
int vcount = (gps->totpoints + (int)is_cyclic) * 2 * 3;
|
||||
DRW_shgroup_call_range(iter->stroke_grp, iter->ob, geom, vfirst, vcount);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user