Fixed such that it uses a vertex buffer