summaryrefslogtreecommitdiff
path: root/sly/render
diff options
context:
space:
mode:
authorDavid Thompson <davet@gnu.org>2015-06-06 09:30:12 -0400
committerDavid Thompson <davet@gnu.org>2015-06-06 09:30:12 -0400
commitbef0b89e4e8eec38fac455f19657ecff979aa287 (patch)
treeda88d6c57cae908906c2868cb119ed1bc47d6879 /sly/render
parentfe677bd06a3646f92c9b3b5111260191272b19e6 (diff)
render: texture: Add texture-null? procedure.
* sly/render/texture.scm (texture-null?): New procedure.
Diffstat (limited to 'sly/render')
-rw-r--r--sly/render/texture.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/sly/render/texture.scm b/sly/render/texture.scm
index d9c9267..df786b6 100644
--- a/sly/render/texture.scm
+++ b/sly/render/texture.scm
@@ -39,6 +39,7 @@
load-texture
texture?
texture-region?
+ texture-null?
texture-id
texture-parent
texture-width
@@ -75,6 +76,10 @@
(define null-texture (%make-texture 0 #f 0 0 0 0 0 0))
+(define (texture-null? texture)
+ "Return #t if TEXTURE is the null texture."
+ (eq? texture null-texture))
+
(define (texture-region? texture)
"Return #t if TEXTURE has a parent texture."
(texture? (texture-parent texture)))