def __init__(self, file_object, vbsize, means, mode, dim, scaled = True):
        self.vbos = []
        self.allcolor = False
        start_idx = 0
        self.file_object = file_object
        end_idx = vbsize
        i = 1

        while(start_idx < len((file_object))):
            i += 1
            try:
                end_idx = min(len(file_object), start_idx + vbsize) 
                print("Buffering points " + str(start_idx) + " to " + str((end_idx)))
                dat = self.slice_file(start_idx, end_idx, means, scaled)
                self.set_color_mode(mode,dim, start_idx, end_idx, dat)
                _vbo = vbo.VBO(data = np.array(dat, dtype = np.float32),
                            usage = gl.GL_DYNAMIC_DRAW, target = gl.GL_ARRAY_BUFFER)
                self.vbos.append((_vbo, end_idx -start_idx))
                start_idx += vbsize
            except Exception, err:
                print("Error initializing VBO:")
                print(err)
dataset/ETHPy150Open grantbrown/laspy/laspy/glviewer.py/VBO_Provider.__init__/original