mirror of
https://github.com/VictorEijkhout/TheArtOfHPC_vol3_cppf08programming.git
synced 2026-01-24 22:44:48 +09:00
26 lines
493 B
C++
26 lines
493 B
C++
#include <SFML/Graphics.hpp>
|
|
|
|
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;
|
|
}
|
|
|