Created
June 1, 2023 20:46
-
-
Save senapk/577c9f758f69c18ebcb0ec18eba724dc to your computer and use it in GitHub Desktop.
teste do sfml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SFML/Graphics.hpp> | |
/* | |
g++ -Wall -Wextra -Werror teste.cpp -o app.exe -lsfml-graphics -lsfml-window -lsfml-system | |
.\app.exe | |
*/ | |
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment