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 --- structs.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'structs.scm') diff --git a/structs.scm b/structs.scm index 44ed30b..76cc6ca 100644 --- a/structs.scm +++ b/structs.scm @@ -123,3 +123,24 @@ (c-lambda (rec float) void "___arg1.width = ___arg2;")) (define rec-height-set! (c-lambda (rec float) void "___arg1.height = ___arg2;")) + + +;; texture, 5 components, id32w32h32mipmaps32format32 (160bit) +(c-define-type texture (struct "Texture")) + +;; RenderTexture, 3 components: uint id, Texture tex, Texture depth +(c-define-type render-texture (struct "RenderTexture")) + +(define render-texture-id + (c-lambda (render-texture) int "___return(___arg1.id);")) +(define render-texture-tex + (c-lambda (render-texture) texture "___return(___arg1.texture);")) +(define render-texture-depth + (c-lambda (render-texture) texture "___return(___arg1.depth);")) + +(define load-render-texture + (c-lambda (int int) render-texture "LoadRenderTexture")) +(define render-texture-ready? + (c-lambda (render-texture) bool "IsRenderTextureReady")) +(define unload-render-texture + (c-lambda (render-texture) void "UnloadRenderTexture")) -- cgit v1.2.3