Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
update accumulate example
Browse files Browse the repository at this point in the history
  • Loading branch information
ztellman committed Feb 21, 2010
1 parent 6ca038c commit bf20e44
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/example/opengl/accumulate.clj
Expand Up @@ -19,17 +19,18 @@
(ortho-view 0 w h 0 -1 1)
(when-let [t (:tex state)]
(destroy-texture t))
(assoc state
:tex (create-byte-texture w h)))
(let [t (create-byte-texture w h)]
(render-to-texture t (clear))
(assoc state
:tex t)))

(defn mouse-drag [_ [x y] button state]
(assoc state
:point [x y]))

(defn display [_ state]
(render-to-texture (:tex state)
(blit (:tex state))
(when-let [p (:point state)]
(when-let [p (:point state)]
(with-disabled :texture-2d
(draw-points (apply vertex p)))))
(blit (:tex state)))
Expand Down

0 comments on commit bf20e44

Please sign in to comment.