---
name: "SDL_RenderGeometryRaw"
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_RenderGeometryRaw"
---

# SDL\_RenderGeometryRaw(3)

Render a list of triangles, optionally using a texture and indices into the vertex arrays Color and alpha modulation is done per vertex ( SDL\_SetTextureColorMod and SDL\_SetTextureAlphaMod are ignored).

## NAME

SDL\_RenderGeometryRaw - Render a list of triangles, optionally using a texture and indices into the vertex arrays 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\_RenderGeometryRaw(SDL\_Renderer \*renderer,**                    **SDL\_Texture \*texture,**                    **const float \*xy, int xy\_stride,**                    **const SDL\_FColor \*color, int color\_stride,**                    **const float \*uv, int uv\_stride,**                    **int num\_vertices,**                    **const void \*indices, int num\_indices, int size\_indices);**

## FUNCTION PARAMETERS

- *renderer*

  the rendering context.

- *texture*

  (optional) The SDL texture to use.

- *xy*

  vertex positions.

- *xy\_stride*

  byte size to move from one element to the next element.

- *color*

  vertex colors (as  **SDL\_FColor** ).

- *color\_stride*

  byte size to move from one element to the next element.

- *uv*

  vertex normalized texture coordinates.

- *uv\_stride*

  byte size to move from one element to the next element.

- *num\_vertices*

  number of vertices.

- *indices*

  (optional) An array of indices into the 'vertices' arrays, if NULL all vertices will be rendered in sequential order.

- *num\_indices*

  number of indices.

- *size\_indices*

  index size: 1 (byte), 2 (short), 4 (int).

## 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\_RenderGeometry**(3)](/SDL_RenderGeometry/3.md)
