#ifndef RENDERER_HPP
#define RENDERER_HPP

#include "../renderer/renderer_api.hpp"
#include "../renderer/vertex_array.hpp"
#include "../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 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 SceneData* scene_data = new SceneData;
    };
}

#endif // RENDERER_HPP
