Added infinite-loop.scm

This commit is contained in:
Barra Ó Catháin 2023-03-10 23:59:55 +00:00
parent 88d0d2a058
commit 97f5c9b02a
1 changed files with 8 additions and 6 deletions

View File

@ -8,15 +8,17 @@
(sdl2 events)
(sdl2 input keyboard))
(define (draw ren)
(set-renderer-draw-color! ren 255 255 255 255)
(define (draw renderer)
(set-renderer-draw-color! renderer 255 255 255 255)
(let* ((surface (load-image "guile.png"))
(texture (surface->texture ren surface)))
(texture (surface->texture renderer surface)))
(do ((event (poll-event) (poll-event)))
((eq? '#t (quit-event? event)))
(clear-renderer ren)
(render-copy ren texture)
(present-renderer ren))))
(clear-renderer renderer)
(render-copy renderer texture)
(present-renderer renderer))))
(sdl-init)