diff options
Diffstat (limited to 'raylib.sld')
| -rw-r--r-- | raylib.sld | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |
