djyt / cannonball

Cannonball: An Enhanced OutRun Engine
http://reassembler.blogspot.com
649 stars 116 forks source link

Added SDL2 support. OpenGL and GLES2 rendering working with SDL2 cont… #18

Closed vanfanel closed 8 years ago

vanfanel commented 8 years ago

…ext, too.

The PR is a bit big because some SDL2 classes more or less replicate SDL1 code. SDL2/RenderGLES is new, as is SDL2/RenderSurface, but others have more or less simple changes. I could merge both SDL1 and SDL2 classes, but it would complicate things even more, and would add a lot more of #ifdefs, as it we wouldn't have enough already on the main video classes... So, as things are laid out now, the definitive jump to SDL2 (when you finally deprecate all the antiquated SDL1 code) will be very, very easy.

Also, for SDL2 code maintenance/corrections and reading, this is much easier than having common SDL1/SDL2 classes full of #ifdefs.