def __init__(self, buffer: moderngl.Buffer, buffer_format: str, attributes=None, per_instance=False):
self.buffer = buffer<EOL>self.attrib_formats = types.parse_attribute_formats(buffer_format)<EOL>self.attributes = attributes<EOL>self.per_instance = per_instance<EOL>if self.buffer.size % self.vertex_size != <NUM_LIT:0>:<EOL><INDENT>raise VAOError("<STR_LIT>".format(<EOL>buffer_format, self.vertex_size, self.buffer.size % self.vertex_size<EOL>))<EOL><DEDENT>self.vertices = self.buffer.size // self.vertex_size<EOL>
:param buffer: The vbo object
:param format: The format of the buffer