Skip to content

Instantly share code, notes, and snippets.

@jvillste
Created September 17, 2011 17:10
Show Gist options
  • Save jvillste/1224139 to your computer and use it in GitHub Desktop.
Save jvillste/1224139 to your computer and use it in GitHub Desktop.
(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