sfml draw line 1

sfml draw line

sf::Vertex line[] =
{
    sf::Vertex(sf::Vector2f(10, 10)),
    sf::Vertex(sf::Vector2f(150, 150))
};

window.draw(line, 2, sf::Lines);

Here is what the above code is Doing:
1. Create a window
2. Create a line
3. Draw the line

Similar Posts