Feature request: SDL_RenderCopyPolygon

Hello guys. We have SDL_RenderCopy for rectangle rendering. But I think it would be great if we have some function like this for any custom polygon render copy

extern DECLSPEC int SDLCALL SDL_RenderCopyPolygon(SDL_Renderer* renderer,
SDL_Texture* texture,
const SDL_FPoint* srcpoints,
const SDL_FPoint* dstpoints,
int count);

It will be very useful for polygon texture atlases. For example, spine sdk uses polygon atlases for skeleton animations packing.

What do you think about that?

hey, maybe you can try this branch / PR: Triangles rendering by 1bsyl · Pull Request #4148 · libsdl-org/SDL · GitHub

1 Like

or read this SDL OpenGL ES2 autobatching patch - #32 by rmg.nik

1 Like

Sylvain_Becker, so your pull request was closed. SDL will not have ability to render triangles or polygons?

I re-opened it.
It’s limited to render textured and non-textured uniform triangles

There is another PR: to render triangles with per vertex color.

1 Like

Thank you for doing this. It is very useful feature.