Created
August 23, 2013 13:57
-
-
Save jmingtan/6319600 to your computer and use it in GitHub Desktop.
Setup libgdx in Clojure
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
; from https://github.com/SilverCrowBlog/Clojure-Libgdx | |
; project.clj | |
(defproject testing "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[com.badlogic.gdx/gdx "0.9.9-SNAPSHOT"] | |
[com.badlogic.gdx/gdx-backend-lwjgl "0.9.9-SNAPSHOT"]] | |
:repositories [["libgdx" "http://libgdx.badlogicgames.com/nightlies/maven/"]] | |
:main testing.core) | |
; testing/core.clj | |
(ns testing.core | |
(:gen-class) | |
(:import (com.badlogic.gdx ApplicationListener Gdx) | |
(com.badlogic.gdx.backends.lwjgl LwjglApplication))) | |
(def app | |
(proxy [ApplicationListener] [] | |
(resize [w h]) | |
(create []) | |
(render []) | |
(pause []) | |
(resume []) | |
(dispose []))) | |
(defn -main [] | |
(let [title "My Game" | |
width 800 | |
height 480 | |
opengl-es? false] | |
(LwjglApplication. app title width height opengl-es?))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment