Added variant of creating window and renderer without main loop.