mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
15 lines
356 B
Plaintext
15 lines
356 B
Plaintext
(load-and-use SDL)
|
|
|
|
(Project.config "title" "Minimal")
|
|
|
|
(defn tick [state]
|
|
(+ state 10))
|
|
|
|
(defn draw [app rend state]
|
|
(bg rend &(rgb (/ @state 2) (/ @state 3) (/ @state 4))))
|
|
|
|
(defn main []
|
|
(let [app (SDLApp.create "The Minimalistic Color Generator" 400 300)
|
|
state 0]
|
|
(SDLApp.run-with-callbacks &app SDLApp.quit-on-esc tick draw state)))
|