logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_RenderGeometryRaw - Render a list of triangles, optionally using a texture and indices into the

Availability

       This function is available since SDL 3.2.0.

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

Header File

       Defined in SDL3/SDL_render.h

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

Return Value

       Returns true on success or false on failure; call

       SDL_GetError () for more information.

See Also

(3), SDL_RenderGeometry(3)

Simple Directmedia Layer                           SDL 3.2.10                           SDL_RenderGeometryRaw(3)

Synopsis

#include"SDL3/SDL.h"boolSDL_RenderGeometryRaw(SDL_Renderer*renderer,SDL_Texture*texture,constfloat*xy,intxy_stride,constSDL_FColor*color,intcolor_stride,constfloat*uv,intuv_stride,intnum_vertices,constvoid*indices,intnum_indices,intsize_indices);

Thread Safety

       This function should only be called on the main thread.

See Also