Fortran · 532 bytes Raw Blame History
1 program fortty
2 use window_mod
3 use gl_bindings
4 implicit none
5
6 type(window_t) :: win
7
8 ! Create window with OpenGL context
9 win = window_create(800, 600, "fortty")
10
11 ! Main event loop
12 do while (.not. window_should_close(win))
13 ! Clear screen with dark gray background
14 call glClearColor(0.1, 0.1, 0.12, 1.0)
15 call glClear(GL_COLOR_BUFFER_BIT)
16
17 ! Swap buffers and poll events
18 call window_swap_buffers(win)
19 call window_poll_events()
20 end do
21
22 ! Cleanup
23 call window_destroy(win)
24
25 end program fortty
26