summaryrefslogtreecommitdiffstats
path: root/src/graphics/Display.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-18 16:03:05 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-18 16:03:05 +0200
commit4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79 (patch)
tree548911d4e341fd5717acff3b5bc752c7b5650bf4 /src/graphics/Display.hpp
parent2017-05-13 (diff)
downloadAltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar
AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.gz
AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.bz2
AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.lz
AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.xz
AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.tar.zst
AltCraft-4d7b1da29e0957ac798ee8e6da8288cbd4ae5c79.zip
Diffstat (limited to 'src/graphics/Display.hpp')
-rw-r--r--src/graphics/Display.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/graphics/Display.hpp b/src/graphics/Display.hpp
new file mode 100644
index 0000000..7458bcd
--- /dev/null
+++ b/src/graphics/Display.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <SFML/Window.hpp>
+#include "../world/World.hpp"
+#include <glm/glm.hpp>
+#include <glm/gtc/matrix_transform.hpp>
+#include <glm/gtc/type_ptr.hpp>
+#include "Shader.hpp"
+#include "Texture.hpp"
+#include "Camera3D.hpp"
+
+class Display {
+ sf::Window *window;
+ World* world;
+ std::vector<Vector> toRender;
+ Camera3D camera;
+public:
+ Display(unsigned int winWidth, unsigned int winHeight, const char winTitle[9], World *worldPtr);
+
+ bool IsClosed();
+
+ void SetPlayerPos(double playerX, double playerY, double playerZ);
+
+ void MainLoop();
+
+ unsigned int width() {
+ return window->getSize().x;
+ }
+
+ unsigned int height() {
+ return window->getSize().y;
+ }
+}; \ No newline at end of file