[SDL] How about an SDL_RenderFillQuad function?

Naith Danielane85 at hotmail.com
Fri Sep 30 09:07:43 PDT 2016


SeanOConnor wrote:
> I also want the line to be any colour (set by what the player chooses) so I couldn't use a fixed PNG file for my texture. I suppose I could create the texture on the fly and fill it with an SDL_RenderFillRect and then rotate that, but it seems like a hell of a lot of work for something that ought to be trivial.

If you want to let the user control the color of a texture you can load, for example, a PNG-image containg a white quad and when the texture is created, use SDL_SetTextureColorMod to set the color of the texture.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20160930/2a64a50d/attachment.htm>


More information about the SDL mailing list