aboutsummaryrefslogtreecommitdiffstats
path: root/raylib.sld
diff options
context:
space:
mode:
Diffstat (limited to 'raylib.sld')
-rw-r--r--raylib.sld13
1 files changed, 13 insertions, 0 deletions
diff --git a/raylib.sld b/raylib.sld
index 44e78db..21746c7 100644
--- a/raylib.sld
+++ b/raylib.sld
@@ -2,6 +2,7 @@
(export init-window close-window)
(export with-drawing begin-drawing end-drawing)
(export in-scissor-mode begin-scissor-mode end-scissor-mode)
+ (export in-texture-mode begin-texture-mode end-texture-mode)
(import (gambit))
(pkg-config "gl" "raylib")
@@ -25,6 +26,10 @@
;;; rshapes module
;;; --------------
(include "shapes.scm")
+ ;;; ---------------
+ ;;; textures module
+ ;;; ---------------
+ (include "texture.scm")
(begin
(c-declare "#include \"raylib.h\"")
@@ -62,6 +67,14 @@
(lambda () (begin body ...))
end-drawing))))
+ (define-syntax in-texture-mode
+ (syntax-rules ()
+ ((with-drawing-to-texture (texture) body ...)
+ (dynamic-wind
+ (lambda () (begin-texture-mode texture))
+ (lambda () (begin body ...))
+ end-texture-mode))))
+
;;; less hygienic drawing context for R5RS
;; (define-macro (with-drawing . body)
;; `(dynamic-wind