diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-05-07 08:56:30 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-05-07 08:56:30 -0400 |
commit | a5170a38e87b8ba4d6043e180e95f92927c8e467 (patch) | |
tree | 6c0f1b81870f756677b0909719d3366f2da4b487 | |
parent | b6d74a9e66e0fdd15f0c93ba8a633bb51bfb976b (diff) |
model: Don't crash due to unsupported glTF texture wrap mode.
Just default to repeat for now.
-rw-r--r-- | chickadee/graphics/model.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chickadee/graphics/model.scm b/chickadee/graphics/model.scm index 55374fe..ea4533f 100644 --- a/chickadee/graphics/model.scm +++ b/chickadee/graphics/model.scm @@ -861,9 +861,11 @@ (define (texture-wrap n) (match n (10496 'clamp) - ((or #f 10497) 'repeat) + (10497 'repeat) (33069 'clamp-to-border) - (33071 'clamp-to-edge))) + (33071 'clamp-to-edge) + ;; TODO: Support mirrored repeat. + (_ 'repeat))) (define (parse-texture obj images samplers) (let ((image (vector-ref images (number-ref obj "source"))) (sampler |