diff options
| author | gonzo <gonzo@toniatuh.com> | 2024-11-18 21:30:06 +0100 |
|---|---|---|
| committer | gonzo <gonzo@toniatuh.com> | 2024-11-18 21:59:12 +0100 |
| commit | 4aefdc362813c5fd5dca4f677088d374058fa4b9 (patch) | |
| tree | b715428fb94587a6ff7653d275dce7bb0b9a620d /raylib.sld | |
| parent | c24e9c8679d43ad5960864b1e7c746b2dcf53562 (diff) | |
| download | gambit-raylib-4aefdc362813c5fd5dca4f677088d374058fa4b9.tar.gz | |
added render textures and some texture functionality
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 |
