added renderer and switched context creation to SDL2