added a way to provide an index buffer when creating meshes