Add two data members to the GameApp class, mainWindow and mainGLContext. I need these data members when working with SDL2.
Initial conversion of code for SDL 2. The first conversion is to use the context flags SDL_WINDOW_SHOWN and SDL_WINDOW_OPENGL. The second conversion is to replace the call to SDL_SetVideoMode() with calls to SDL_CreateWindow to create the SDL window and SDL_GL_CreateContext to create an OpenGL context from an SDL window. The final conversion is to replace the call to SDL_GL_SwapBuffers() with SDL_GL_SwapWindow().
When the player quits the game, delete the OpenGL context and window we created.
Remove the colorDepth argument from the InitializeSDL() method. SDL2's SDL_CreateWindow() method does not take a color depth as an argument so there's no need to supply a color depth.
Remove some commented out code.
Remove a stale part of an old comment. SDL 2 no longer requires that a color depth be specified.
Turn on OpenGL double buffering.
Add call to my Cleanup() method in the destructor. I had written a Cleanup() method, but didn't call it anywhere.
CMake support added
Builds with CMake
Unused code removed
InitGL is eliminated
All in one file
SDL_INIT and SDL_QUIT are called in an exception-safe way
SDL_CreateWindow is called in an exception safe way
SDL_GL_CreateContext is called in an exception-safe way
Adding the timer is done in an exception-safe way
createWindow is wrapped.
Unnecessary files removed
Empty sdl.* files added for the wrappers