diff options
author | David Thompson <dave@izanagi> | 2013-06-16 14:32:50 -0400 |
---|---|---|
committer | David Thompson <dave@izanagi> | 2013-06-16 14:32:50 -0400 |
commit | c04b4b1ea000410c8fa64834043f7361dd7a7460 (patch) | |
tree | 39381d387b1a8326de300864a879b8bc3ecbf3e5 /2d | |
parent | c1868d7b2b5f4dbf12711d340b53ca5ced4ad44f (diff) |
Add a color parameter to texture-quad.
Diffstat (limited to '2d')
-rw-r--r-- | 2d/texture.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/2d/texture.scm b/2d/texture.scm index 2081670..50ac21e 100644 --- a/2d/texture.scm +++ b/2d/texture.scm @@ -71,12 +71,13 @@ Currently only works with RGBA format surfaces." "Loads a texture from a file." (surface->texture (SDL:load-image filename))) -(define* (texture-quad texture x y w h) +(define* (texture-quad texture x y w h #:optional (color '(1 1 1))) "Renders a textured quad." (let ((x2 (+ x w)) (y2 (+ y h))) (with-gl-bind-texture (texture-target texture-2d) (texture-id texture) (gl-begin (begin-mode quads) + (apply gl-color color) (gl-texture-coordinates 0 0) (gl-vertex x y) (gl-texture-coordinates 1 0) |