set gl attributes before creating the window, or some of them might be ignored (like vsync on osx); also don't skip some reloads when switching to fullscreen and back; finally did a little code re-organisation
apparently sdl doesn't work anymore on ios < 3.2 so it is worth to take the leap and upgrade the minimum os to 4.0, so that we can use new apis (like imageio from sdl_image)