summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2d/texture.scm24
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)))))