mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-11 20:49:05 +03:00
23 lines
345 B
Plaintext
23 lines
345 B
Plaintext
(import gl)
|
|
|
|
(defn init [window]
|
|
(do
|
|
(glfwSetCursorPosCallback window on-cursor)
|
|
0))
|
|
|
|
(defn on-cursor (x y)
|
|
(println (ref (str x))))
|
|
|
|
;;(str "x: " x ", y: " y)
|
|
|
|
(defn draw [state]
|
|
(do
|
|
(glColor3f 1f 1f 0f)
|
|
(draw-circle 0f 0f 0.9f)))
|
|
|
|
(defn mouse []
|
|
(glfw-app "Mouse" init id draw default-on-keys))
|
|
|
|
(bake mouse)
|
|
;;(mouse)
|