Did you know ... Search Documentation:
Pack sdlpl -- prolog/sdl/render.pl
PublicShow source
 sdl_renderclear(+Renderer:blob) is det
Clear the current rendering target with the drawing color.
See also
- https://wiki.libsdl.org/SDL3/SDL_RenderClear
 sdl_renderpresent(+Renderer:blob) is det
Present the rendered frame to the screen.
See also
- https://wiki.libsdl.org/SDL3/SDL_RenderPresent
 sdl_destroyrenderer(+Renderer:blob) is det
Destroy a previously created renderer blob.
See also
- https://wiki.libsdl.org/SDL3/SDL_DestroyRenderer
 sdl_destroytexture(+Texture:blob) is det
Destroy a previously created texture blob.
See also
- https://wiki.libsdl.org/SDL3/SDL_DestroyTexture
 sdl_createrenderer(-Renderer:blob, +Window:blob, +Name:term) is det
Create a 2D hardware-accelerated renderer for the given window. Name selects the driver (null for the default) or a string naming a driver.
See also
- https://wiki.libsdl.org/SDL3/SDL_CreateRenderer
 sdl_setrendervsync(+Renderer:blob, +VSync:integer) is det
Toggle the renderer's vsync synchronization. VSync is 0 (off), 1 (on) or a negative value for "late" vsync.
See also
- https://wiki.libsdl.org/SDL3/SDL_SetRenderVSync
 sdl_createtexturefromsurface(-Texture:blob, +Renderer:blob, +Surface:blob) is det
Create a texture from an existing surface blob.
See also
- https://wiki.libsdl.org/SDL3/SDL_CreateTextureFromSurface
 sdl_rendertexture(+Renderer:blob, +Texture:blob, +Srcrect:term, +Dstrect:term) is det
Draw a texture to the renderer. Each of Srcrect and Dstrect is null for the corresponding full region, or a term rect(X, Y, W, H).
See also
- https://wiki.libsdl.org/SDL3/SDL_RenderTexture
 sdl_setrenderdrawcolor(+Renderer:blob, +R:between(0,255), +G:between(0,255), +B:between(0,255), +A:between(0,255)) is det
Set the color used by sdl_renderrect/2 and sdl_renderfillrect/2.
See also
- https://wiki.libsdl.org/SDL3/SDL_SetRenderDrawColor
 sdl_renderrect(+Renderer:blob, +Rect:rect) is det
Draw a rectangle outline. Rect is a term rect(X, Y, W, H) of numbers.
See also
- https://wiki.libsdl.org/SDL3/SDL_RenderRect
 sdl_renderfillrect(+Renderer:blob, +Rect:rect) is det
Draw a filled rectangle. Rect is a term rect(X, Y, W, H) of numbers.
See also
- https://wiki.libsdl.org/SDL3/SDL_RenderFillRect
 sdl_texture_access(?Access:atom, ?Value:integer) is nondet
Texture access patterns.
  • static
  • streaming
  • target
See also
- https://wiki.libsdl.org/SDL3/SDL_TextureAccess
 sdl_createtexture(-Texture:blob, +Renderer:blob, +Format:sdl_pixel_format, +Access:sdl_texture_access, +Width:positive_integer, +Height:positive_integer) is det
Create a texture. Format is one of the atoms enumerated by sdl_pixel_format/2 and Access one of the atoms enumerated by sdl_texture_access/2.
See also
- https://wiki.libsdl.org/SDL3/SDL_CreateTexture
 sdl_updatetexture(+Texture:blob, +Rect:term, +Pixels:ptr_blob, +Pitch:integer) is det
Update a texture with new pixel data from a PtrBlob, avoiding creating/destroying a texture every frame when streaming dynamically rendered content (e.g. cairo). Rect is null for the entire texture, or a term rect(X, Y, W, H).
See also
- https://wiki.libsdl.org/SDL3/SDL_UpdateTexture
 sdl_locktexture(+Texture:blob, +Rect:term, -Pixels:ptr, -Pitch:integer)
is det.

Lock a texture so it can be updated. On success Pixels is a PtrBlob to the locked region and Pitch its row stride. Rect is null for the whole texture, or a term rect(X, Y, W, H). Use sdl_unlocktexture/1 when done.

See also
- https://wiki.libsdl.org/SDL3/SDL_LockTexture
 sdl_unlocktexture(+Texture:blob) is det
Unlock a texture previously locked with sdl_locktexture/4.
See also
- https://wiki.libsdl.org/SDL3/SDL_UnlockTexture