sdlRenderGeometryRaw function render

bool sdlRenderGeometryRaw(
  1. Pointer<SdlRenderer> renderer,
  2. Pointer<SdlTexture> texture,
  3. Pointer<Float> xy,
  4. int xyStride,
  5. Pointer<SdlFColor> color,
  6. int colorStride,
  7. Pointer<Float> uv,
  8. int uvStride,
  9. int numVertices,
  10. Pointer<NativeType> indices,
  11. int numIndices,
  12. int sizeIndices,
)

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

\param renderer the rendering context. \param texture (optional) The SDL texture to use. \param xy vertex positions. \param xy_stride byte size to move from one element to the next element. \param color vertex colors (as SDL_FColor). \param color_stride byte size to move from one element to the next element. \param uv vertex normalized texture coordinates. \param uv_stride byte size to move from one element to the next element. \param num_vertices number of vertices. \param indices (optional) An array of indices into the 'vertices' arrays, if NULL all vertices will be rendered in sequential order. \param num_indices number of indices. \param size_indices index size: 1 (byte), 2 (short), 4 (int). \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.2.0.

\sa SDL_RenderGeometry \sa SDL_SetRenderTextureAddressMode

extern SDL_DECLSPEC bool SDLCALL 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)

Implementation

bool sdlRenderGeometryRaw(
  Pointer<SdlRenderer> renderer,
  Pointer<SdlTexture> texture,
  Pointer<Float> xy,
  int xyStride,
  Pointer<SdlFColor> color,
  int colorStride,
  Pointer<Float> uv,
  int uvStride,
  int numVertices,
  Pointer<NativeType> indices,
  int numIndices,
  int sizeIndices,
) {
  final sdlRenderGeometryRawLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(
          Pointer<SdlRenderer> renderer,
          Pointer<SdlTexture> texture,
          Pointer<Float> xy,
          Int32 xyStride,
          Pointer<SdlFColor> color,
          Int32 colorStride,
          Pointer<Float> uv,
          Int32 uvStride,
          Int32 numVertices,
          Pointer<NativeType> indices,
          Int32 numIndices,
          Int32 sizeIndices,
        ),
        int Function(
          Pointer<SdlRenderer> renderer,
          Pointer<SdlTexture> texture,
          Pointer<Float> xy,
          int xyStride,
          Pointer<SdlFColor> color,
          int colorStride,
          Pointer<Float> uv,
          int uvStride,
          int numVertices,
          Pointer<NativeType> indices,
          int numIndices,
          int sizeIndices,
        )
      >('SDL_RenderGeometryRaw');
  return sdlRenderGeometryRawLookupFunction(
        renderer,
        texture,
        xy,
        xyStride,
        color,
        colorStride,
        uv,
        uvStride,
        numVertices,
        indices,
        numIndices,
        sizeIndices,
      ) ==
      1;
}