From d6b994602f3336c98cbb740e65b8c671d3509331 Mon Sep 17 00:00:00 2001 From: oakes Date: Mon, 1 Sep 2014 23:18:11 -0400 Subject: [PATCH] Add execute-fn-on-gl! function --- src/play_clj/core.clj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/play_clj/core.clj b/src/play_clj/core.clj index fbd5e9e..a2cf004 100644 --- a/src/play_clj/core.clj +++ b/src/play_clj/core.clj @@ -76,12 +76,15 @@ (wrapper screen) (reset-changed! entities old-entities) (update-screen! @screen))))) + execute-fn-on-gl! (fn [& args] + (on-gl (apply execute-fn! args))) update-fn! (fn [func args] (doto (apply swap! screen func args) update-screen!))] {:screen screen :entities entities :execute-fn! execute-fn! + :execute-fn-on-gl! execute-fn-on-gl! :update-fn! update-fn! :options options :show (fn [] @@ -92,6 +95,7 @@ (update-fn! assoc [:total-time 0 :execute-fn! execute-fn! + :execute-fn-on-gl! execute-fn-on-gl! :update-fn! update-fn! :options options :on-timer on-timer