#pragma once
#include "ogl.hpp"
#include "common.hpp"
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>


class LookAt {
    private:
        const Window* const window;
        const GLuint uniModel, uniView, uniProj;

        static const GLfloat id[];
        glm::mat4 view, proj;
        glm::vec4 viewport;

    public:
        LookAt(const Window*, GLuint, GLuint, GLuint);
        int project(int, GLfloat=0.0f, GLfloat=0.0f);
        void unproject(double, double, float, GLfloat&, GLfloat&) const;
};