Re: How about an SDL_RenderFillQuad function?

"Naith" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
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.

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
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.