original_docstring: Copy data into this buffer from another buffer
  
          :param Buffer source: The buffer to copy from
          :param int size: The amount of bytes to copy
          :param int offset: The byte offset to write the data in this buffer
          :param int source_offset: The byte offset to read from the source buffer
          
docstring: Copy data into this buffer from another buffer
docstring_tokens: Copy data into this buffer from another buffer
code: def copy_from_buffer(self, source: "Buffer", size=-1, offset=0, source_offset=0):
          """Copy data into this buffer from another buffer
  
          :param Buffer source: The buffer to copy from
          :param int size: The amount of bytes to copy
          :param int offset: The byte offset to write the data in this buffer
          :param int source_offset: The byte offset to read from the source buffer
          """
          # Read the entire source buffer into this buffer
          if size == -1:
              size = source.size
  
          # TODO: Check buffer bounds
          if size + source_offset > source.size:
              raise ValueError("Attempting to read outside the source buffer")
  
          if size + offset > self._size:
              raise ValueError("Attempting to write outside the buffer")
  
          gl.glBindBuffer(gl.GL_COPY_READ_BUFFER, source.glo)
          gl.glBindBuffer(gl.GL_COPY_WRITE_BUFFER, self._glo)
          gl.glCopyBufferSubData(
              gl.GL_COPY_READ_BUFFER,
              gl.GL_COPY_WRITE_BUFFER,
              gl.GLintptr(source_offset),  # readOffset
              gl.GLintptr(offset),  # writeOffset
              size,  # size (number of bytes to copy)
          )
code_tokens: def copy_from_buffer ( self , source : "Buffer" , size = - 1 , offset = 0 , source_offset = 0 ) : if size == - 1 : size = source . size if size + source_offset > source . size : raise ValueError ( "Attempting to read outside the source buffer" ) if size + offset > self . _size : raise ValueError ( "Attempting to write outside the buffer" ) gl . glBindBuffer ( gl . GL_COPY_READ_BUFFER , source . glo ) gl . glBindBuffer ( gl . GL_COPY_WRITE_BUFFER , self . _glo ) gl . glCopyBufferSubData ( gl . GL_COPY_READ_BUFFER , gl . GL_COPY_WRITE_BUFFER , gl . GLintptr ( source_offset ) , gl . GLintptr ( offset ) , size , )
short_docstring: Copy data into this buffer from another buffer
short_docstring_tokens: Copy data into this buffer from another buffer
comment: """Copy data into this buffer from another buffer
  
          :param Buffer source: The buffer to copy from
          :param int size: The amount of bytes to copy
          :param int offset: The byte offset to write the data in this buffer
          :param int source_offset: The byte offset to read from the source buffer
          """$SEP$# Read the entire source buffer into this buffer$SEP$# TODO: Check buffer bounds$SEP$# readOffset$SEP$# writeOffset$SEP$# size (number of bytes to copy)