Re: How about an SDL_RenderFillQuad function?

Sanette <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
for lines, you can store a line in a texture (or, for that matter, you 
can simply store a pixel)
and then rotate and strech the texture with SDL_RenderCopyEx

Le 30/09/2016 à 17:07, SeanOConnor a écrit :
> 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

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