Advertisement
Guest User

Example SFML

a guest
Feb 14th, 2016
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <SFML/Graphics.hpp>
  2. //comandos para compilar  -lsfml-graphics -lsfml-window -lsfml-system
  3. int main()
  4. {
  5.     sf::RenderWindow window(sf::VideoMode(200, 200), "Hello people");
  6.     sf::CircleShape shape(100.f);
  7.     shape.setFillColor(sf::Color::Green);
  8.  
  9.     while (window.isOpen()){
  10.         sf::Event event;
  11.         while (window.pollEvent(event)){
  12.             if (event.type == sf::Event::Closed)
  13.                 window.close();
  14.         }
  15.  
  16.         window.clear();
  17.         window.draw(shape);
  18.         window.display();
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement