Ejemplo n.º 1
0
 def __add__(self, other):
     """Add an integer to this VBO (create a VBOOffset)"""
     if hasattr(other, 'offset'):
         other = other.offset
     assert isinstance(
         other, int), """Only know how to add integer/long offsets"""
     return VBOOffset(self, other)
Ejemplo n.º 2
0
 def __add__( self, other ):
     """Allow adding integers or other VBOOffset instances 
     
     returns a VBOOffset to the this VBO with other.offset + self.offset
     or, if other has no offset, returns VBOOffset with self.offset + other
     """
     if hasattr( other, 'offset' ):
         other = other.offset
     return VBOOffset( self.vbo, self.offset + other )
Ejemplo n.º 3
0
 def __add__(self, other):
     if hasattr(other, 'offset'):
         other = other.offset
     return VBOOffset(self.vbo, self.offset + other)