@@ -2294,7 +2294,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderTexture9GridTiled(SDL_Renderer *rende
2294
2294
* \since This function is available since SDL 3.2.0.
2295
2295
*
2296
2296
* \sa SDL_RenderGeometryRaw
2297
- * \sa SDL_RenderGeometryRawEx
2297
+ * \sa SDL_RenderGeometryEx
2298
2298
*/
2299
2299
extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometry (SDL_Renderer * renderer ,
2300
2300
SDL_Texture * texture ,
@@ -2327,7 +2327,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer,
2327
2327
* \since This function is available since SDL 3.2.0.
2328
2328
*
2329
2329
* \sa SDL_RenderGeometry
2330
- * \sa SDL_RenderGeometryRawEx
2330
+ * \sa SDL_RenderGeometryEx
2331
2331
*/
2332
2332
extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryRaw (SDL_Renderer * renderer ,
2333
2333
SDL_Texture * texture ,
@@ -2337,6 +2337,29 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
2337
2337
int num_vertices ,
2338
2338
const void * indices , int num_indices , int size_indices );
2339
2339
2340
+ /**
2341
+ * Argument struct for SDL_RenderGeometryEx.
2342
+ *
2343
+ * \since This struct is available since SDL 3.4.0.
2344
+ */
2345
+ typedef struct SDL_RenderGeometryEx_Arg
2346
+ {
2347
+ size_t arg_size /**< the size of this struct, must be set with sizeof() */
2348
+ int ver_len ; /**< number of vertices. */
2349
+
2350
+ const void * map ; /**< (optional) An array of indices into the 'vertices' arrays, if NULL all vertices will be rendered in sequential order. */
2351
+ int map_size ; /**< index size: 1 (byte), 2 (short), 4 (int). */
2352
+ int map_len ; /**< number of indices. */
2353
+ const float * pos ; /**< vertex positions. */
2354
+ int pos_stride ; /**< byte size to move from one element to the next element. */
2355
+ int pos_len ; /**< how many vertext position coordinates, must be 2, 3, or 4. */
2356
+ const SDL_FColor * col ; /**< vertex colors (as SDL_FColor). */
2357
+ int col_stride ; /**< byte size to move from one element to the next element. */
2358
+
2359
+ const float * tex ; /**< vertex normalized texture coordinates. */
2360
+ int tex_stride ; /**< byte size to move from one element to the next element. */
2361
+
2362
+ } SDL_RenderGeometryEx_Arg ;
2340
2363
2341
2364
/**
2342
2365
* Render a list of triangles, optionally using a texture and indices into the
@@ -2346,18 +2369,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
2346
2369
*
2347
2370
* \param renderer the rendering context.
2348
2371
* \param texture (optional) The SDL texture to use.
2349
- * \param pos vertex positions.
2350
- * \param pos_stride byte size to move from one element to the next element.
2351
- * \param pos_len how many vertext position coordinates, must be 2, 3, or 4.
2352
- * \param color vertex colors (as SDL_FColor).
2353
- * \param color_stride byte size to move from one element to the next element.
2354
- * \param uv vertex normalized texture coordinates.
2355
- * \param uv_stride byte size to move from one element to the next element.
2356
- * \param num_vertices number of vertices.
2357
- * \param indices (optional) An array of indices into the 'vertices' arrays,
2358
- * if NULL all vertices will be rendered in sequential order.
2359
- * \param num_indices number of indices.
2360
- * \param size_indices index size: 1 (byte), 2 (short), 4 (int).
2372
+ * \param arg pointer to an SDL_RenderGeometryEx_Arg struct of vertex info.
2361
2373
* \returns true on success or false on failure; call SDL_GetError() for more
2362
2374
* information.
2363
2375
*
@@ -2368,13 +2380,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer,
2368
2380
* \sa SDL_RenderGeometry
2369
2381
* \sa SDL_RenderGeometryRaw
2370
2382
*/
2371
- extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryRawEx (SDL_Renderer * renderer ,
2372
- SDL_Texture * texture ,
2373
- const float * pos , int pos_stride , Uint8 pos_len ,
2374
- const SDL_FColor * color , int color_stride ,
2375
- const float * uv , int uv_stride ,
2376
- int num_vertices ,
2377
- const void * indices , int num_indices , int size_indices );
2383
+ extern SDL_DECLSPEC bool SDLCALL SDL_RenderGeometryEx (SDL_Renderer * renderer ,
2384
+ SDL_Texture * texture , const SDL_RenderGeometryEx_Arg * arg );
2378
2385
2379
2386
/**
2380
2387
* Read pixels from the current rendering target.
0 commit comments