Created
September 17, 2011 17:10
-
-
Save jvillste/1224139 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- load [image-list] | |
(when (:needs-to-load image-list) | |
(quad-buffer/load (:quad-buffer image-list)) | |
(quad-list/load (:quad-list image-list)) | |
(texture-atlas/load (:texture-atlas image-list))) | |
(assoc image-list :needs-to-load false)) | |
(defn- draw-image-list [image-list] | |
(draw/draw-quads (:vertex-buffer-id (:quad-buffer image-list)) | |
(:texture-coordinate-buffer-id (:texture-atlas image-list)) | |
(:index-buffer-id (:quad-list image-list)) | |
(:image-count image-list)) | |
image-list) | |
(defn draw [image-list] | |
(-> image-list | |
(load) | |
(draw-image-list))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment