feat: Adding smfl hello world code

This commit is contained in:
PolishPigeon 2022-01-21 03:42:58 +01:00 committed by KRZYSZTOF RUDNICKI
parent 326a2ad04c
commit 775e1c50f1
4 changed files with 30 additions and 0 deletions

BIN
SFMLEngine/app Executable file

Binary file not shown.

24
SFMLEngine/hello.cpp Normal file
View File

@ -0,0 +1,24 @@
#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;
}

BIN
SFMLEngine/hello.o Normal file

Binary file not shown.

6
SFMLEngine/makefile Normal file
View File

@ -0,0 +1,6 @@
compile:./hello.cpp
g++ -c ./hello.cpp
g++ hello.o -o app -lsfml-graphics -lsfml-window -lsfml-system
run:
./app