summaryrefslogtreecommitdiff
path: root/sdl2/render.scm
diff options
context:
space:
mode:
authorLeo Prikler <leo.prikler@student.tugraz.at>2020-09-29 11:10:32 +0200
committerDavid Thompson <dthompson2@worcester.edu>2020-09-30 08:38:06 -0400
commit1054cbd906ced5cb38476b00700aa8c279f6e1c8 (patch)
tree1e719e0d9a1222e458a9cf9abbf8b87b0a3a82f3 /sdl2/render.scm
parent5654ee59b26d0718b99e149da7f7325418186597 (diff)
Add blend mode bindings.
Diffstat (limited to 'sdl2/render.scm')
-rw-r--r--sdl2/render.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/sdl2/render.scm b/sdl2/render.scm
index f937eca..6a9c0b2 100644
--- a/sdl2/render.scm
+++ b/sdl2/render.scm
@@ -41,6 +41,7 @@
set-render-target!
get-render-target
set-render-draw-color
+ set-render-draw-blend-mode
render-draw-line
render-draw-lines
render-draw-point
@@ -121,6 +122,12 @@ color."
"Display RENDERER."
(ffi:sdl-render-present (unwrap-renderer renderer)))
+(define (set-render-draw-blend-mode renderer blend-mode)
+ "Set blend mode of RENDERER to BLEND-MODE."
+ (ffi:sdl-set-render-draw-blend-mode
+ (unwrap-renderer renderer)
+ ((@@ (sdl2 blend-mode) blend-mode-bitmask) blend-mode)))
+
(define (set-render-draw-color renderer r g b a)
"Set draw color of RENDERER."
(ffi:sdl-set-render-draw-color (unwrap-renderer renderer) r g b a))