Next: , Previous: , Up: API Reference   [Contents][Index]


3.7 Rendering

(use-modules (sdl2 render))
Procedure: make-renderer window [#:optional flags='(accelerated vsync)]

Return a new renderer for window created with the options specified in flags, a list of symbols. The valid symbols that may appear in flags are:

Procedure: renderer? r

Return #t if r is a renderer.

Procedure: delete-renderer! renderer

Delete the rendering context renderer.

Procedure: call-with-renderer renderer proc

Call proc, passing it renderer and closing renderer upon exit of proc.

Procedure: clear-renderer renderer

Clear the rendering target renderer with the current drawing color.

Procedure: present-renderer renderer

Display renderer.

Procedure: render-copy renderer texture [#:angle 0] [#:srcrect] [#:dstrect] [#:center]

Copy texture to the rendering target of renderer.

Procedure: render-draw-line renderer x1 y1 x2 y2

Draw a line from (x1, y1) to (x2, y2) on the current rendering target of renderer.

Procedure: render-draw-lines renderer point

Draw a series of connected lines from points on the current rendering target of renderer.

Procedure: render-draw-point renderer x y

Draw a point at (x, y) on the current rendering target of renderer.

Procedure: render-draw-points renderer points

Draw a multiple points from points on the current rendering target of renderer.

Procedure: surface->texture renderer surface

Convert surface to a texture suitable for renderer.

Procedure: delete-texture! texture

Free the memory used by texture.


Next: , Previous: , Up: API Reference   [Contents][Index]