DRY up initMeshBuffers