Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creating The Game window.
(ns core
(:gen-class))
(assembly-load-from "./extern/OpenTK/lib/net20/OpenTK.dll")
(defn -main[]
(Console/WriteLine "Starting OpenTK Window."))
(ns core
(:gen-class))
(assembly-load-from "./extern/OpenTK/lib/net20/OpenTK.dll")
(import [System]
[System.IO]
[System.Console]
[System.Drawing]
[OpenTK]
[OpenTK.Graphics.ES30 ClearBufferMask]
[OpenTK.Graphics.OpenGL GL]
[OpenTK.Input]
[clojure.lang])
(defn -main []
(Console/WriteLine "Starting OpenTK Window."))
(ns core
(:gen-class))
(assembly-load-from "./extern/OpenTK/lib/net20/OpenTK.dll")
(import [System]
[System.IO]
[System.Console]
[System.Drawing]
[OpenTK]
[OpenTK.Graphics.ES30 ClearBufferMask]
[OpenTK.Graphics.OpenGL GL]
[OpenTK.Input]
[clojure.lang])
(defonce game (new GameWindow 800 600))
(def CornflowerBlue Color/CornflowerBlue)
(defn -main []
(Console/WriteLine "Starting OpenTK Window.")
(GL/ClearColor CornflowerBlue)
(GL/Clear ClearBufferMask/ColorBufferBit)
(.SwapBuffers game)
(.Run game 30.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment