The buffer of vertices used to draw line hits is filled with both
vertices corresponding to snapped to vertices and other hits. These two
parts are rendered using two calls to GPU_batch_draw_advanced. But these
calls are made inconditionally, even when one of the buffer part is
empty (when there is no hit snapped to a vertex for example).
But when calling GPU_batch_draw_advanced with an argument vcount equal
to 0, it extract vcount from the vertex buffer. In this case, it leads to two bugs:
- some hits are drawn twice
- some hits outside the buffer are drawn (leading to some hits appearing at the object's origin)