Add tiled terrain rendering and fix GL buffer overflow