---
name: "SDL_RenderGeometry"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_RenderGeometry"
---

# SDL\_RenderGeometry(3)

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).

## NAME

SDL\_RenderGeometry - 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).

## HEADER FILE

Defined in SDL3/SDL\_render.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_RenderGeometry(SDL\_Renderer \*renderer,**                    **SDL\_Texture \*texture,**                    **const SDL\_Vertex \*vertices, int num\_vertices,**                    **const int \*indices, int num\_indices);**

## FUNCTION 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

**•**(3), [**SDL\_RenderGeometryRaw**(3)](/SDL_RenderGeometryRaw/3.md)
