import sys
import sdl2.ext
RESOURCES=sdl2.ext.Resources(__file__,"resources")
def run():
    sdl2.ext.init()
    window = sdl2.ext.Window("Hello World!", size=(592, 860))
    window.show()
    print("Using software rendering")
    factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE)
    spriterenderer = factory.create_sprite_render_system(window)
    sprite = factory.from_image(RESOURCES.get_path("hello.png"))
    spriterenderer.render(sprite)
    processer = sdl2.ext.TestEventProcessor()
    processer.run(window)
    sdl2.ext.quit()

if  __name__== "__main__":
    sys.exit(run())
