Switched to vertex buffer object to improve performance.
Also implemented an optimization for fully tiled textures such as the sky, thereby fixing severe performance loss at high resolutions due to the sheer number of primitives being rendered otherwise.