Advertisement
STANAANDREY

sf2

Apr 10th, 2019
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 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.  
  7.     RenderWindow window(sf::VideoMode(520, 520), "SFML works!");
  8.  
  9. void tri()
  10. {
  11.        CircleShape shape;
  12.     shape.setRadius(260.f);
  13.     shape.setPointCount(3);
  14.     shape.setFillColor(sf::Color::Green);
  15.  
  16.     while (window.isOpen())
  17.     {
  18.         Event event;
  19.         while (window.pollEvent(event))
  20.         {
  21.             if (event.type == Event::Closed)
  22.                 window.close();
  23.         }
  24.  
  25.         window.clear();
  26.         window.draw(shape);
  27.         window.display();
  28.     }
  29. }
  30.  
  31.  
  32.  
  33. int main()
  34. {
  35. // tri();
  36.  
  37.  
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement