[SDL] How about an SDL_RenderFillQuad function?
grimfang4 at gmail.com
Fri Sep 30 06:04:50 PDT 2016
It would probably be better to have a function for arbitrary geometry
composed of triangles, like this one (SDL_RenderGeometry()):
But that feature has been waiting for over three years... and this related
one is 5 years old:
Either of those would enable us to implement rotated quad rendering and
keep the API lean.
In the meantime, I've suggested SDL_gpu if you really need this now.
On Fri, Sep 30, 2016 at 8:37 AM, SeanOConnor <sean at windowsgames.co.uk>
> I need to draw a graph in my game but it looks like the SDL_RenderDrawLine
> only draws lines 1 pixel wide. With a bit of maths I can work out the 4
> points needed to draw a line of any width but the only SDL function that
> draws a primitive seems to be:
> which only draws rectangles with no rotation.
> I'm guessing this SDL function just draws two triangles to make this
> rectangle based on the SDL_Rect it's sent, so surely it'd be trivial to
> create a new function SDL_RenderFillQuad that accepts four SDL_Points and
> draws two triangles based on that?
> And maybe an SDL_RenderFillTriangle too that takes three SDL_Points?
> SDL mailing list
> SDL at lists.libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL