Advertisement
Guest User

Window.cpp

a guest
Aug 18th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <SFML/Graphics.hpp>
  2.  
  3. int main()
  4. {
  5. sf::RenderWindow window(sf::VideoMode(300, 200), "SFML works!");
  6. sf::Text text("Hello SFML");
  7.  
  8. while (window.isOpen())
  9. {
  10. sf::Event event;
  11. while (window.pollEvent(event))
  12. {
  13. if (event.type == sf::Event::Closed)
  14. window.close();
  15. }
  16.  
  17. window.clear();
  18. window.draw(text);
  19. window.display();
  20. }
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement