#ifndef VIEW_LAYER_HPP
#define VIEW_LAYER_HPP

#include <open_engine.hpp>

class ViewLayer : public OpenEngine::Layer
{
    public:
        ViewLayer(const char* layer_name, float ratio, float zoom_level)
            : OpenEngine::Layer(layer_name),
            camera(ratio, zoom_level)
        {
        }

        OpenEngine::Ref<OpenEngine::FrameBuffer>& GetFramebuffer() { return framebuffer; };
        OpenEngine::OrthographicCameraController& GetCamera() { return camera; };

        void SetCursorPos(const glm::vec2& pos) { cursor_position = pos; };
        const glm::vec2& GetCursorPos() { return cursor_position; };

    private:
        OpenEngine::Ref<OpenEngine::FrameBuffer> framebuffer;
        OpenEngine::OrthographicCameraController camera;

        glm::vec2 cursor_position = { 0.0f, 0.0f };
};

#endif // VIEW_LAYER_HPP
