11using Cruise
2- using ODPlugin
3- using HZPlugin
2+ using Cruise. ODPlugin
3+ using Cruise. HZPlugin
4+
5+ using SDLOutdoors, SDLHorizons
46
57app = CruiseApp ()
6- Close = Ref (false )
78
8- merge_plugin! (app, ODPLUGIN, ODPlugin . PHASE )
9- merge_plugin! (app, HZPLUGIN, HZPlugin . PHASE )
9+ merge_plugin! (app, ODPLUGIN)
10+ merge_plugin! (app, HZPLUGIN)
1011
1112win = CreateWindow (SDLStyle, " My First Window" , 640 , 480 )
12- winptr = GetStyle (win). window
13-
14- RegisterBackend (SDLRender, winptr, 640 , 480 )
15-
16- Outdoors. connect (NOTIF_QUIT_EVENT) do
17- Close[] = true
18- end
13+ backend = InitBackend (SDLRender, GetStyle (win). window, 640 , 480 )
1914
2015@gameloop max_fps= 60 begin
21- backend = GetBackend (winptr)
22- if ! isnothing (backend)
23-
24- DrawPoint2D (backend, iRGBA (0 , 50 , 30 , 8 ), Vec2f (50 , 50 ))
25- DrawLine2D (backend, iRGBA (0 , 50 , 30 , 8 ), Vec2f (100 , 100 ), Vec2f (150 , 150 ))
26- end
27- Close[] && shutdown! ()
16+ DrawPoint2D (backend, iRGBA (0 , 50 , 30 , 8 ), Vec2f (50 , 50 ))
17+ DrawLine2D (backend, iRGBA (0 , 50 , 30 , 8 ), Vec2f (100 , 100 ), Vec2f (150 , 150 ))
18+ app. ShouldClose && shutdown! ()
2819end
0 commit comments