#ifndef RENDERER_HPP
#define RENDERER_HPP

#include "open_engine/core.hpp"
#include "open_engine/renderer/renderer_api.hpp"
#include "open_engine/renderer/vertex_array.hpp"
#include "open_engine/orthographic_camera.hpp"
#include "open_engine/renderer/shader.hpp"

#include <glm/glm.hpp>
#include <cstdint>

namespace OpenEngine {
    class Renderer
    {
        public:
            static void Init();
            static void ShutDown();

            static void OnWindowResize(uint32_t width, uint32_t height);

            static void BeginScene(const OrthographicCamera& camera);
            static void EndScene();

            static void Submit(const Ref<Shader> shader,
                    const Ref<VertexArray>& vertex_array,
                    const glm::mat4& transform = glm::mat4(1.0f));

            inline static RendererAPI::API GetAPI() { return RendererAPI::GetAPI(); };

        private:
            struct SceneData
            {
                glm::mat4 view_projection_matrix;
            };

            inline static Scope<SceneData> scene_data = CreateScope<SceneData>();
    };
}

#endif // RENDERER_HPP
