private void Flush()
{
if (!_hasBegun)
throw new InvalidOperationException("Begin must be called before Flush can be called.");
if (_lineVertsCount >= 2)
{
int primitiveCount = _lineVertsCount / 2;
// submit the draw call to the graphics card
_device.DrawUserPrimitives(PrimitiveType.LineList, _lineVertices, 0, primitiveCount);
_lineVertsCount -= primitiveCount * 2;
}
}