Skip to content

Instantly share code, notes, and snippets.

@senapk
Created June 1, 2023 20:46
Show Gist options
  • Save senapk/577c9f758f69c18ebcb0ec18eba724dc to your computer and use it in GitHub Desktop.
Save senapk/577c9f758f69c18ebcb0ec18eba724dc to your computer and use it in GitHub Desktop.
teste do sfml
#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