Blame view

src/sfmlTest.cpp 520 Bytes
cd132533   Geoffrey PREUD'HOMME   Workflow initial
1
2
  #include <SFML/Graphics.hpp>
  
fd0f6b67   Geoffrey PREUD'HOMME   Intégration de la...
3
4
5
  #include "sfmlTest.hpp"
  
  int sfmlTest()
cd132533   Geoffrey PREUD'HOMME   Workflow initial
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  {
      sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
      sf::CircleShape shape(100.f);
      shape.setFillColor(sf::Color::Green);
  
      while (window.isOpen())
      {
          sf::Event event;
          while (window.pollEvent(event))
          {
              if (event.type == sf::Event::Closed)
                  window.close();
          }
  
          window.clear();
          window.draw(shape);
          window.display();
      }
  
      return 0;
  }