The x values with sf::Vertex seem to be one off what they are meant to be.
This shows nothing:
#include <SFML/Graphics.hpp>
int main()
{
//The Window
sf::RenderWindow window(sf::VideoMode(600, 400), "SFML works!");
sf::Vertex line[2];
while (window.isOpen())
{
line[0].position.x = 0;
line[0].position.y = 0;
line[1].position.x = 0;
line[1].position.y = 100;
window.clear();
window.draw(line, 2, sf::Lines);
window.display();
}
return 0;
}
while this shows a line going across the top of the window
#include <SFML/Graphics.hpp>
int main()
{
//The Window
sf::RenderWindow window(sf::VideoMode(600, 400), "SFML works!");
sf::Vertex line[2];
while (window.isOpen())
{
line[0].position.x = 0;
line[0].position.y = 0;
line[1].position.x = 100;
line[1].position.y = 0;
window.clear();
window.draw(line, 2, sf::Lines);
window.display();
}
return 0;
}