diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-02-15 21:06:20 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-02-16 10:46:58 -0500 |
commit | 11dd0ef869d2f45c88583464beef8a5243e3998a (patch) | |
tree | a0797957598ba783c35491e8deffaf156c1794aa | |
parent | e27e57dda2c50a4c11f9075dfaac2df9ba4263c7 (diff) |
Delete draw-texture.
* 2d/texture.scm (draw-texture): Delete it.
-rw-r--r-- | 2d/texture.scm | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/2d/texture.scm b/2d/texture.scm index faa2359..cfcd2bf 100644 --- a/2d/texture.scm +++ b/2d/texture.scm @@ -150,27 +150,3 @@ that will be rendered, in pixels." (texture (bitmap->texture bitmap))) (freeimage-unload bitmap) texture)) - -(define* (draw-texture texture x y #:optional (color white)) - "Render a textured quad in GL immediate mode." - (let* ((x2 (+ x (texture-width texture))) - (y2 (+ y (texture-height texture))) - (r (vector-ref color 0)) - (g (vector-ref color 1)) - (b (vector-ref color 2)) - (a (vector-ref color 3)) - (s1 (texture-s1 texture)) - (t1 (texture-t1 texture)) - (s2 (texture-s2 texture)) - (t2 (texture-t2 texture))) - (with-gl-bind-texture (texture-target texture-2d) (texture-id texture) - (use-color color) - (gl-begin (begin-mode quads) - (gl-texture-coordinates s1 t1) - (gl-vertex x y) - (gl-texture-coordinates s1 t2) - (gl-vertex x y2) - (gl-texture-coordinates s2 t2) - (gl-vertex x2 y2) - (gl-texture-coordinates s2 t1) - (gl-vertex x2 y))))) |