Add execute-fn-on-gl! function

This commit is contained in:
oakes
2014-09-01 23:18:11 -04:00
parent bf77d6b82d
commit d6b994602f

View File

@@ -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