summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-03-11 22:21:32 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-03-11 22:27:25 -0400
commit0fb4ec6b8cf60981bd1b96cfbf3bc41e0afead0d (patch)
tree08ed1a755d4ebaf6cf93dc0c201a1b855eee98e0
parent99b05d3e2c27b575157f00450143cdff965c5369 (diff)
render: texture: Ensure 2D textures are enabled when applying texture.
* sly/render/texture.scm (apply-texture): Enable 2D textures before binding texture.
-rw-r--r--sly/render/texture.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/sly/render/texture.scm b/sly/render/texture.scm
index 0ebcd0c..d9c9267 100644
--- a/sly/render/texture.scm
+++ b/sly/render/texture.scm
@@ -220,7 +220,9 @@ vector to be returned."
(pack vertices (+ offset 3) texture-vertex width 0 s2 t1))
(define (apply-texture texture)
- (glBindTexture (texture-target texture-2d) (texture-id texture)))
+ (gl-enable (enable-cap texture-2d))
+ (glBindTexture (texture-target texture-2d)
+ (texture-id texture)))
(define-syntax-rule (with-texture texture body ...)
(begin