From 4aefdc362813c5fd5dca4f677088d374058fa4b9 Mon Sep 17 00:00:00 2001 From: gonzo Date: Mon, 18 Nov 2024 21:30:06 +0100 Subject: added render textures and some texture functionality --- raylib.sld | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'raylib.sld') 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 -- cgit v1.2.3