diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-05-10 08:02:05 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-05-10 08:02:05 -0400 |
commit | dd1f79d0fad8d4922cfb8e255d85b7e4865d8331 (patch) | |
tree | 801d9a4b51cd3a248ee077313930882343b30160 | |
parent | fe0bfc56cde0ee8fed2e45aaa5a3f11a102e476b (diff) |
graphics: texture: Add support for mirrored repeat wrap mode.
-rw-r--r-- | chickadee/graphics/texture.scm | 7 | ||||
-rw-r--r-- | doc/api.texi | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/chickadee/graphics/texture.scm b/chickadee/graphics/texture.scm index dd2a6d8..b9efd17 100644 --- a/chickadee/graphics/texture.scm +++ b/chickadee/graphics/texture.scm @@ -167,12 +167,13 @@ lower-left corner of the image, set FLIP? to #t. The generated texture uses MIN-FILTER for downscaling and MAG-FILTER for upscaling. WRAP-S and WRAP-T are symbols that control how texture access is handled for texture coordinates outside the [0, 1] range. Allowed -symbols are: repeat (the default), clamp, clamp-to-border, -clamp-to-edge. FORMAT specifies the pixel format. Currently only -32-bit RGBA format is supported." +symbols are: repeat (the default), mirrored-repeat, clamp, +clamp-to-border, clamp-to-edge. FORMAT specifies the pixel format. +Currently only 32-bit RGBA format is supported." (define (gl-wrap mode) (match mode ('repeat (texture-wrap-mode repeat)) + ('mirrored-repeat (version-1-4 mirrored-repeat)) ('clamp (texture-wrap-mode clamp)) ('clamp-to-border (texture-wrap-mode clamp-to-border-sgis)) ('clamp-to-edge (texture-wrap-mode clamp-to-edge-sgis)))) diff --git a/doc/api.texi b/doc/api.texi index da05e62..8a06690 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -1851,8 +1851,8 @@ respectively. Possible values are @code{nearest} and @code{linear}. @var{wrap-s} and @var{wrap-t} describe how to interpret texture coordinates that are greater than @code{1.0}. Possible values are -@code{repeat}, @code{clamp}, @code{clamp-to-border}, and -@code{clamp-to-edge}. +@code{repeat}, @code{mirrored-repeat}, @code{clamp}, +@code{clamp-to-border}, and @code{clamp-to-edge}. For color-keyed images (images where a specific color should be made transparent), specify the appropriate @var{transparent-color}. |