summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/texture.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/chickadee/graphics/texture.scm b/chickadee/graphics/texture.scm
index b9efd17..56843ad 100644
--- a/chickadee/graphics/texture.scm
+++ b/chickadee/graphics/texture.scm
@@ -187,8 +187,10 @@ Currently only 32-bit RGBA format is supported."
(make-rect 0.0 1.0 1.0 -1.0)
(make-rect 0.0 0.0 1.0 1.0)))))
(graphics-engine-guard! texture)
- (with-graphics-state ((g:texture-0 texture))
- (graphics-engine-commit!)
+ (with-graphics-state! ((g:texture-0 texture))
+ ;; Ensure that we are using texture unit 0 because
+ ;; with-graphics-state! doesn't guarantee it.
+ (set-gl-active-texture (version-1-3 texture0))
(gl-texture-parameter (texture-target texture-2d)
(texture-parameter-name texture-min-filter)
(match min-filter