Skip to content

Commit fb8eedd

Browse files
authored
Create test.c
1 parent a6f2ccb commit fb8eedd

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
*
3+
* @Name : FirstSFML/test.c
4+
* @Version : 1.0
5+
* @Programmer : Max
6+
* @Date : 2019-05-16
7+
* @Released under : https://github.com/BaseMax/FirstSFML/blob/master/LICENSE
8+
* @Repository : https://github.com/BaseMax/FirstSFML
9+
*
10+
**/
11+
#include <SFML/Graphics.hpp>
12+
using namespace sf;
13+
14+
int main() {
15+
RenderWindow window(sf::VideoMode(400, 400), "SFML");
16+
CircleShape shape(100);
17+
shape.setFillColor(Color::Green);
18+
while(window.isOpen()) {
19+
Event event;
20+
while(window.pollEvent(event)) {
21+
if(event.type == Event::Closed)
22+
window.close();
23+
}
24+
window.clear();
25+
window.draw(shape);
26+
window.display();
27+
}
28+
return 0;
29+
}

0 commit comments

Comments
 (0)