Mercurial > hg > indyvon
changeset 164:d91a7e0388da
Preserve bindings for asynchronous drawing.
author | Mikhail Kryshen <mikhail@kryshen.net> |
---|---|
date | Tue, 25 Nov 2014 17:18:48 +0300 |
parents | dc3ed475c6d6 |
children | 421dba17b7ed |
files | src/indyvon/async.clj |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/src/indyvon/async.clj Mon Nov 24 02:17:54 2014 +0300 1.2 +++ b/src/indyvon/async.clj Tue Nov 25 17:18:48 2014 +0300 1.3 @@ -126,13 +126,14 @@ 1.4 1.5 (defn- draw-offscreen-async [async-view] 1.6 (.execute ^ThreadPoolExecutor (:executor async-view) 1.7 - #(draw-offscreen async-view))) 1.8 + (bound-fn* #(draw-offscreen async-view)))) 1.9 1.10 (defrecord AsyncView [scene width height executor buffers] 1.11 View 1.12 (render! [view] 1.13 (repaint-on-update view) 1.14 - (add-context-observer scene (fn [_ _] (draw-offscreen-async view))) 1.15 + (add-context-observer scene (bound-fn [_ _] 1.16 + (draw-offscreen-async view))) 1.17 (when-not @buffers 1.18 ;; TODO: dynamic size, recreate buffers when size increases. 1.19 (let [device-conf (.getDeviceConfiguration *graphics*)