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 /structs.scm | |
| parent | c24e9c8679d43ad5960864b1e7c746b2dcf53562 (diff) | |
| download | gambit-raylib-4aefdc362813c5fd5dca4f677088d374058fa4b9.tar.gz | |
added render textures and some texture functionality
Diffstat (limited to 'structs.scm')
| -rw-r--r-- | structs.scm | 21 |
1 files changed, 21 insertions, 0 deletions
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")) |
