Function SDL_RenderGeometry

pub unsafe extern "C" fn SDL_RenderGeometry(
    renderer: *mut SDL_Renderer,
    texture: *mut SDL_Texture,
    vertices: *const SDL_Vertex,
    num_vertices: i32,
    indices: *const i32,
    num_indices: i32,
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

Render a list of triangles, optionally using a texture and indices into the vertex array Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).

§Parameters

  • renderer: the rendering context.
  • texture: (optional) The SDL texture to use.
  • vertices: vertices.
  • num_vertices: number of vertices.
  • indices: (optional) An array of integer indices into the ‘vertices’ array, if NULL all vertices will be rendered in sequential order.
  • num_indices: number of indices.

§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