Fix a corrupted openGL tiles problem on OSX
I don't know what exactly the reason of such behavior, but if we
try to render a frame before the tiles are uploaded, the result will be
corrupted. Therefore, workaround it with a glFinish call after uploading
the data.