summaryrefslogtreecommitdiff
path: root/sdl2/render.scm
diff options
context:
space:
mode:
Diffstat (limited to 'sdl2/render.scm')
-rw-r--r--sdl2/render.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/sdl2/render.scm b/sdl2/render.scm
index 9e4bf57..187c650 100644
--- a/sdl2/render.scm
+++ b/sdl2/render.scm
@@ -41,6 +41,7 @@
render-draw-line
render-draw-point
+ destroy-texture!
surface->texture))
@@ -138,6 +139,9 @@ color."
(sdl-error "surface->texture" "failed to convert surface to texture")
(wrap-texture ptr))))
+(define (delete-texture! texture)
+ "Free the memory used by TEXTURE."
+ (ffi:sdl-destroy-texture (unwrap-texture texture)))
(define* (render-copy renderer texture
#:key (angle 0) srcrect dstrect center)