Function SDL_RenderDebugTextFormat

pub unsafe extern "C" fn SDL_RenderDebugTextFormat(
    renderer: *mut SDL_Renderer,
    x: f32,
    y: f32,
    fmt: *const i8,
    ...
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

Draw debug text to an SDL_Renderer.

This function will render a printf()-style format string to a renderer. Note that this is a convinence function for debugging, with severe limitations, and is not intended to be used for production apps and games.

For the full list of limitations and other useful information, see SDL_RenderDebugText.

§Parameters

  • renderer: the renderer which should draw the text.
  • x: the x coordinate where the top-left corner of the text will draw.
  • y: the y coordinate where the top-left corner of the text will draw.
  • fmt: the format string to draw.
  • ...: additional parameters matching % tokens in the fmt string, if any.

§Return value

Returns true on success or false on failure; call SDL_GetError() for more information.

§Thread safety

This function should only be called on the main thread.

§Availability

This function is available since SDL 3.2.0.

§See also