From 84a314e0b065fcba2ec94ecd2e3ec58a5a754926 Mon Sep 17 00:00:00 2001 From: oakes Date: Fri, 13 Jun 2014 12:50:36 -0400 Subject: [PATCH] Add gl macro --- doclet/resources/classes.edn | 3 ++- src/play_clj/core_basics.clj | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doclet/resources/classes.edn b/doclet/resources/classes.edn index 6c6e029..3c79c96 100644 --- a/doclet/resources/classes.edn +++ b/doclet/resources/classes.edn @@ -92,7 +92,8 @@ "grid-point-2!" :methods} "GridPoint3" {"grid-point-3" :methods "grid-point-3!" :methods} - "GL20" {"gl!" :methods} + "GL20" {"gl!" :methods + "gl" :static-fields} "HexagonalTiledMapRenderer" {"hexagonal-tiled-map" :methods "hexagonal-tiled-map!" :methods} "HorizontalGroup" {"horizontal" :methods diff --git a/src/play_clj/core_basics.clj b/src/play_clj/core_basics.clj index 50cb500..eb7911a 100644 --- a/src/play_clj/core_basics.clj +++ b/src/play_clj/core_basics.clj @@ -60,6 +60,13 @@ [k & options] `(u/call! ^GL20 (Gdx/gl20) ~k ~@options)) +(defmacro gl + "Returns a static field from [Gdx.gl20](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/GL20.html). + + (gl :gl-triangles)" + [k] + `~(u/gdx-field :graphics :GL20 (u/key->upper k))) + (defmacro graphics! "Calls a single method on [Gdx.graphics](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Graphics.html).