CSFML : Draw Line

380 Views Asked by At

i'm working on a school project using CSFML (The SFML library but in C), i'm trying to display a line between two points but impossible for me to find any good documentation to do it, if someone know how to do it, please help me.

i've got his doc: https://www.sfml-dev.org/tutorials/2.0/graphics-shape-fr.php and my code look like this:

    sfRenderWindow_clear(window.window, sfBlack);
    sfRectangleShape *rectangle = sfRectangleShape_create();
    sfRectangleShape line(rectangle);
    sfRenderWindow_display(window.window);

but there is nothing on my window. The doc tell something like window.draw(); to draw it but it's not recognized as a valid function so...

Thank you

0

There are 0 best solutions below