[SDL] How about an SDL_RenderFillQuad function?

Sik the hedgehog sik.the.hedgehog at gmail.com
Fri Sep 30 15:18:30 PDT 2016


2016-09-30 12:07 GMT-03:00, SeanOConnor <sean at windowsgames.co.uk>:
> I just thought that adding a quad, triangle or arbitrary number of points
> function would be so easy (as rects are drawn with triangles anyway) it
> might as well be added, and I was surprised those functions weren't there
> already.

Because of the software renderer. That one is using dedicated
algorithms instead of triangles. And honestly a good reason why we
need triangle routines for it, because then at worst we can just build
everything else on top of that.

This is a problem that has been going on for a long while though. SDL
supports multiple backends for the renderer (software, different
OpenGL versions, different Direct3D versions), but they don't want to
add a new function that doesn't work in all backends. And then what
happens is somebody contributes a new function for one backend, but
then nobody wants to bother implementing the function in the other
backends, and the end result is that the function goes nowhere and
gets forgotten. On top of the fact most people don't want to use the
renderer anyway (they either use SDL_gpu or, more likely, they just go
straight with their own OpenGL code).

Actually heck, adding triangle functions would probably solve it for
all backends.


More information about the SDL mailing list