sdlRenderGeometry function

int sdlRenderGeometry(
  1. Pointer<SdlRenderer> renderer,
  2. Pointer<SdlTexture> texture,
  3. Pointer<SdlVertex> vertices,
  4. int numVertices,
  5. Pointer<Int32> indices,
  6. int numIndices,
)

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

\param renderer The rendering context. \param texture (optional) The SDL texture to use. \param vertices Vertices. \param num_vertices Number of vertices. \param indices (optional) An array of integer indices into the 'vertices' array, if NULL all vertices will be rendered in sequential order. \param num_indices Number of indices. \return 0 on success, or -1 if the operation is not supported

\since This function is available since SDL 2.0.18.

\sa SDL_RenderGeometryRaw \sa SDL_Vertex

extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices)

Implementation

int sdlRenderGeometry(
    Pointer<SdlRenderer> renderer,
    Pointer<SdlTexture> texture,
    Pointer<SdlVertex> vertices,
    int numVertices,
    Pointer<Int32> indices,
    int numIndices) {
  final sdlRenderGeometryLookupFunction = libSdl2.lookupFunction<
      Int32 Function(
          Pointer<SdlRenderer> renderer,
          Pointer<SdlTexture> texture,
          Pointer<SdlVertex> vertices,
          Int32 numVertices,
          Pointer<Int32> indices,
          Int32 numIndices),
      int Function(
          Pointer<SdlRenderer> renderer,
          Pointer<SdlTexture> texture,
          Pointer<SdlVertex> vertices,
          int numVertices,
          Pointer<Int32> indices,
          int numIndices)>('SDL_RenderGeometry');
  return sdlRenderGeometryLookupFunction(
      renderer, texture, vertices, numVertices, indices, numIndices);
}