[SDL] <DKIM> Re: <DKIM> Re: triangles & aspects

Sanette sanette-linux at laposte.net
Sat Mar 25 12:11:45 PDT 2017


Le 25/03/2017 à 13:07, Sanette a écrit :
> Le 24/03/2017 à 22:03, Clangray a écrit :
>> *Most importantly they need to be filled triangles. How do I fill 
>> traingles?? : )*
>
> if you can use opengl, then it's easy (and super fast. filled 
> triangles are the most basic shape in opengl).
>
> It you want to stick to the SDL renderer API, one possibility is the 
> following:
>
>  * draw a rotated filled rectangle on a TARGET texture
>  * clip two corners by blitting a suitably rotated texture with 0 color

Here is a C implementation of the SDL renderer idea.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20170325/44512b2d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triangle.c
Type: text/x-csrc
Size: 4010 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20170325/44512b2d/attachment.c>


More information about the SDL mailing list