LaurentGomila/SFML — Issue #155: Drawing once doesn't work
Author: KilledWhale
Created: 2012-01-07 14:13:06+00:00
State: open

Following code works randomly but sometimes there's nothing visible on screen.

If I run it using valgrind it works all the time but with GDB it doesn't.

Tested on Linux x64 with nVidia Geforce 8400M.
Friend tried also on 64bit windows but it didn't work for him either.

```C++
#include
#include
#include

using namespace std;

int main() {
sf::RenderWindow window(sf::VideoMode(800, 800), "SFML");

sf::Vertex points[2];
points[0].Position.y = 50;
points[0].Position.x = 50;
points[1].Position.y = 400;
points[1].Position.x = 500;

window.Draw(points, 2, sf::Lines);
window.Display();

while (window.IsOpened()) {
sf::Event ev;
while (window.PollEvent(ev)) {
if (ev.Type == sf::Event::Closed) {
window.Close();
}
}
}

return 0;
}
```