diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-12 15:49:50 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-12 15:49:50 +0200 |
commit | e62817b8252974b8a98393275874ee303840bf13 (patch) | |
tree | 4565935f06e369f4a84410b0c098958e07a750c7 /graphics/Display.hpp | |
parent | 2017-05-10 (diff) | |
download | AltCraft-e62817b8252974b8a98393275874ee303840bf13.tar AltCraft-e62817b8252974b8a98393275874ee303840bf13.tar.gz AltCraft-e62817b8252974b8a98393275874ee303840bf13.tar.bz2 AltCraft-e62817b8252974b8a98393275874ee303840bf13.tar.lz AltCraft-e62817b8252974b8a98393275874ee303840bf13.tar.xz AltCraft-e62817b8252974b8a98393275874ee303840bf13.tar.zst AltCraft-e62817b8252974b8a98393275874ee303840bf13.zip |
Diffstat (limited to '')
-rw-r--r-- | graphics/Display.hpp | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/graphics/Display.hpp b/graphics/Display.hpp index d6737ba..c656f2f 100644 --- a/graphics/Display.hpp +++ b/graphics/Display.hpp @@ -1,30 +1,32 @@ #pragma once -#include <condition_variable> -#include <GL/glew.h> -#include <GLFW/glfw3.h> +#include <SFML/Window.hpp> #include "../World.hpp" - -template <class T> -class CallbackHandler { - -}; +#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 { - World *world; - GLFWwindow *window; - static Display *instance; - //glfw callbacks - static void callback_key(GLFWwindow *window, int key, int scancode, int action, int mode); + sf::Window *window; + World* world; + std::vector<Section*> toRender; public: - Display(int w, int h, std::string title, World *worldPtr); + Display(unsigned int winWidth, unsigned int winHeight, const char winTitle[9], World *worldPtr); + + bool IsClosed(); - ~Display(); + void SetPlayerPos(double playerX, double playerY, double playerZ); void MainLoop(); - bool IsClosed(); - - void SetPlayerPos(float x, float y); -}; + unsigned int width() { + return window->getSize().x; + } + unsigned int height() { + return window->getSize().y; + } +};
\ No newline at end of file |