summaryrefslogtreecommitdiffstats
path: root/src/graphics/Display.hpp
blob: 7458bcdd04b175c8e7ca7540eb6ac4ffa92dac88 (plain) (blame)
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
#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;
    }
};