[SDL] How about an SDL_RenderFillQuad function?
sean at windowsgames.co.uk
Fri Sep 30 05:37:13 PDT 2016
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL