Changed from vertex array to vertex and index buffer objects.