Re: How about an SDL_RenderFillQuad function?

Sik the hedgehog <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <CAEyBR+WOEX94AB=5PqTqF7Bjjojppg=T=1k63iLTL=172CW+Tw@mail.gmail.com>
2016-09-30 12:07 GMT-03:00, SeanOConnor <[email protected]>:
> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.