summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2020-12-05 15:37:58 -0500
committerDavid Thompson <dthompson2@worcester.edu>2020-12-05 15:37:58 -0500
commited821d76b70a1454285d415dfae7db9394c535f2 (patch)
tree4e45339c90d6787eaac51129c9e1ed2955ca09ce
parent826890fef892288b9b63c5cb1aed94cd7830e66d (diff)
render: Rename render-target and set-render-target.
-rw-r--r--doc/api.texi24
-rw-r--r--sdl2/render.scm8
2 files changed, 16 insertions, 16 deletions
diff --git a/doc/api.texi b/doc/api.texi
index c10cd8d..f1075b9 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -1148,6 +1148,18 @@ Set blend mode of @var{renderer} to @var{blend-mode}. @xref{Blend
Modes} for more information.
@end deffn
+@deffn {Procedure} set-renderer-target! renderer texture
+Sets the render target for @var{renderer} to @var{texture}, making all
+comming draw requests redirect to @var{texture}.
+
+Pass @code{#f} to reset it to the default target.
+@end deffn
+
+@deffn {Procedure} renderer-target renderer
+Returns the current render target of @var{renderer} or @code{#f} if
+it's a texture.
+@end deffn
+
@deffn {Procedure} draw-line renderer x1 y1 x2 y2
Draw a line from (@var{x1}, @var{y1}) to (@var{x2}, @var{y2}) on the
current rendering target of @var{renderer}.
@@ -1193,18 +1205,6 @@ performance, @var{rects} may instead be a bytevector packed with
signed 32 bit integers, 4 per rect (x, y, width, height).
@end deffn
-@deffn {Procedure} set-render-target! renderer texture
-Sets the render target for @var{renderer} to @var{texture}, making all
-comming draw requests redirect to @var{texture}.
-
-Pass @code{#f} to reset it to the default target.
-@end deffn
-
-@deffn {Procedure} render-target renderer
-Returns the current render target of @var{renderer} or @code{#f} if
-it's a texture.
-@end deffn
-
@deffn {Procedure} make-texture renderer format access width height
Returns a new texture for @var{renderer} with pixel @var{format}.
@var{access} is one of the symbols:
diff --git a/sdl2/render.scm b/sdl2/render.scm
index 6b7a211..732798c 100644
--- a/sdl2/render.scm
+++ b/sdl2/render.scm
@@ -41,12 +41,12 @@
renderer-scale
renderer-integer-scale
renderer-viewport
- render-target
+ renderer-target
set-renderer-logical-size!
set-renderer-scale!
set-renderer-integer-scale!
set-renderer-viewport!
- set-render-target!
+ set-renderer-target!
set-renderer-draw-color!
set-renderer-draw-blend-mode!
@@ -396,7 +396,7 @@ created with 'texture')"
(unless (zero? result)
(sdl-error "render-copy" "failed to copy texture"))))
-(define (set-render-target! renderer texture)
+(define (set-renderer-target! renderer texture)
"Sets the render target for RENDERER to TEXTURE, making all comming draw
requests redirect to TEXTURE.
@@ -409,7 +409,7 @@ Pass #f to reset it to the default target."
(unless (zero? result)
(sdl-error "set-render-target!" "failed to set render target"))))
-(define (render-target renderer)
+(define (renderer-target renderer)
"Returns the current render target of RENDERER. #f if it's a texture."
(let ((ptr (ffi:sdl-get-render-target (unwrap-renderer renderer))))
(if (null-pointer? ptr)