Last active
July 29, 2019 18:18
-
-
Save metacritical/bed233c07da6c5ab2ba800b91264cef1 to your computer and use it in GitHub Desktop.
Creating The Game window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns core | |
(:gen-class)) | |
(assembly-load-from "./extern/OpenTK/lib/net20/OpenTK.dll") | |
(defn -main[] | |
(Console/WriteLine "Starting OpenTK Window.")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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.")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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