def update_vertex_buffer(vbo, data):
    'Update a vertex buffer with `data` vertices'
    vertices = np.asarray(data, np.float32)
    (count, dim_vertex) = vertices.shape
    with bind(vbo):
        vbo.allocate(vertices.flatten(), vertices.nbytes)
Update a vertex buffer with `data` vertices
def update_vertex_buffer(vbo, data):
    
    vertices = np.asarray(data, np.float32)
    (count, dim_vertex) = vertices.shape
    with bind(vbo):
        vbo.allocate(vertices.flatten(), vertices.nbytes)