(self, size, doslice=True)
Update the total size of the buffer, and update
        the slice information accordingly.
Update the total size of the buffer, and update
        the slice information accordingly.
Update the total size of the buffer and update the slice information accordingly .
def set_size(self, size, doslice=True):
        """Update the total size of the buffer, and update
        the slice information accordingly."""
        # deactivate slicing by using a maxsize number larger than the
        # actual size
        if not doslice:
            maxsize = 2 * size
        else:
            maxsize = None
        self.size = size
        # if not hasattr(self, 'bounds'):
            # self.bounds = np.array([0, size], dtype=np.int32)
        # compute the data slicing with respect to bounds (specified in the
        # template) and to the maximum size of a VBO.
        self.slices = self._get_slices(self.size, maxsize)
        # print self.size, maxsize
        # print self.slices
        self.slice_count = len(self.slices)
def set_size ( self , size , doslice = True ) : # deactivate slicing by using a maxsize number larger than the # actual size if not doslice : maxsize = 2 * size else : maxsize = None self . size = size # if not hasattr(self, 'bounds'): # self.bounds = np.array([0, size], dtype=np.int32) # compute the data slicing with respect to bounds (specified in the # template) and to the maximum size of a VBO. self . slices = self . _get_slices ( self . size , maxsize ) # print self.size, maxsize # print self.slices self . slice_count = len ( self . slices )