Skip to content

Instantly share code, notes, and snippets.

@VyacheslavMik
Created February 20, 2021 13:51
Show Gist options
  • Save VyacheslavMik/64702c36916024c1fbf1211f886eefe4 to your computer and use it in GitHub Desktop.
Save VyacheslavMik/64702c36916024c1fbf1211f886eefe4 to your computer and use it in GitHub Desktop.
(defparameter *screen-width* 640)
(defparameter *screen-height* 480)
(defun run-game ()
(sdl2:with-init (:video)
(sdl2:with-window (window :title "SDL2 Window"
:w *screen-width*
:h *screen-height*
:flags '(:shown :opengl))
(let ((screen-surface (sdl2:get-window-surface window)))
(sdl2:fill-rect screen-surface
nil
(sdl2:map-rgb (sdl2:surface-format screen-surface) 255 255 255))
(sdl2:update-window window)))))
;; (sdl2:make-this-thread-main #'run-game)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment