Advertisement
STANAANDREY

Sfml1

Apr 9th, 2019
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <SFML/Graphics.hpp>
  2. #include <conio.h>
  3. #include <iostream>
  4. using namespace sf;
  5. using namespace std;
  6. int main()
  7. {
  8.     RenderWindow window(sf::VideoMode(520, 520), "SFML works!");
  9.     CircleShape shape(520/2.f);
  10.     shape.setFillColor(sf::Color::Green);
  11.  
  12.     while (window.isOpen())
  13.     {
  14.         Event event;
  15.         while (window.pollEvent(event))
  16.         {
  17.             if (event.type == Event::Closed)
  18.                 window.close();
  19.         }
  20.  
  21.         window.clear();
  22.         window.draw(shape);
  23.         window.display();
  24.     }
  25.  
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement