diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-04-28 19:15:36 +0200 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-04-28 19:15:36 +0200 |
| commit | 4119ff9e3a57d197e36b34f8f6ef4208871b032e (patch) | |
| tree | b917ca7f069f9447420c47eefb1447d9d27916fe /src/main.cpp | |
| parent | 9729ff528df0919630e0668484c52ce3182c5d19 (diff) | |
Create first hello world in SFML (Thank you LaurentGomila for your FindSFML.cmake)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index e69de29..0d3b950 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -0,0 +1,25 @@ +#include <SFML/Graphics.hpp> +#include <string> + +int main() +{ + 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; +} |
