So, I finally got SFML to work, and I am trying to use the tutorials on the site
http://sfml-dev.org/tutorials/1.6/window-window.php
Well, the code at the top doesn't work for me. Am I missing something? My code:
#include <iostream>
#include <SFML/Window.hpp>
using namespace std;
int main(int argc, char** argv)
{
sf::Window window(sf::VideoMode(800, 600, 32), "SFML Window");
while(window.isOpen()){
sf::Event event;
while(window.pollEvent(event)){
if(event.type == sf::Event::Closed){
window.close();
}
}
}
return 0;
}
So, I finally got SFML to work, and I am trying to use the tutorials on the site
http://sfml-dev.org/tutorials/1.6/window-window.php
Well, the code at the top doesn't work for me. Am I missing something? My code:
#include <iostream>
#include <SFML/Window.hpp>
using namespace std;
int main(int argc, char** argv)
{
sf::Window window(sf::VideoMode(800, 600, 32), "SFML Window");
while(window.isOpen()){
sf::Event event;
while(window.pollEvent(event)){
if(event.type == sf::Event::Closed){
window.close();
}
}
}
return 0;
}
whatss wrong is that you didnt display the window. window.display();