-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSource.cpp
45 lines (32 loc) · 929 Bytes
/
Source.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <SFML/Graphics.hpp>
/*
using namespace sf;
int main()
{
RenderWindow window(VideoMode(1920, 1080), "SFML works!", Style::Fullscreen);
CircleShape shape(100.f);
shape.setFillColor(Color::Green);
// Create texture to hold a graphic in GPU//
Texture textureBackGround;
textureBackGround.loadFromFile("D:/VS Project/Timber/graphics/background.png");
// Create a sprite//
Sprite spriteBackground;
spriteBackground.setTexture(textureBackGround);
// Set the sprite background to cover the screen//
spriteBackground.setPosition(0,0);
while (window.isOpen())
{
{
if (Keyboard::isKeyPressed(Keyboard::Escape))
{
window.close();
}
}
window.clear();
window.draw(spriteBackground);
window.draw(shape);
window.display();
}
return 0;
}
*/