Re: How about an SDL_RenderFillQuad function?

"SeanOConnor" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
For now I've done:


Code:

for (xx=-1; xx<=+1; xx++)
{
	for (yy=-1; yy<=+1; yy++)
	{
		SDL_RenderDrawLine(m_pRenderer,
					   	ptFrom.x + xx,
					   	ptFrom.y + yy,
					   	ptTo.x + xx,
					   	ptTo.y + yy);
	}
}





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.

I took a look at SDL_gpu but I'm wary of trying something without much documentation and potential future support. It does seem to use floating points for coordinates though which is another thing I don't get why SDL doesn't use.

_______________________________________________
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.