Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include <SFML/Graphics.hpp>
  2.  
  3. int main()
  4. {
  5.     // Create the main rendering window
  6.     sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
  7.    
  8.     // Start game loop
  9.     while (App.IsOpened())
  10.     {
  11.         // Process events
  12.         sf::Event Event;
  13.         while (App.GetEvent(Event))
  14.         {
  15.             // Close window : exit
  16.             if (Event.Type == sf::Event::Closed)
  17.                 App.Close();
  18.         }
  19.  
  20.         // Clear the screen (fill it with black color)
  21.         App.Clear();
  22.  
  23.         // Display window contents on screen
  24.         App.Display();
  25.     }
  26.  
  27.     return EXIT_SUCCESS;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement