Better API to handle vertex arrays