summaryrefslogtreecommitdiffstats
path: root/code/graphics/Display.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-13 16:01:56 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-13 16:01:56 +0200
commit1563ae5be6bc130a9b3a23464f7e28fdb1e87da3 (patch)
treeb1f65a03827494fa78e320b134f4cc7df54754bb /code/graphics/Display.hpp
parent2017-05-12 (diff)
downloadAltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar
AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.gz
AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.bz2
AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.lz
AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.xz
AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.zst
AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.zip
Diffstat (limited to 'code/graphics/Display.hpp')
-rw-r--r--code/graphics/Display.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/code/graphics/Display.hpp b/code/graphics/Display.hpp
new file mode 100644
index 0000000..314ef5d
--- /dev/null
+++ b/code/graphics/Display.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <SFML/Window.hpp>
+#include "../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<PositionI> 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