#ifndef RENDER_COMMAND_HPP
#define RENDER_COMMAND_HPP

#include "../renderer/renderer_api.hpp"
#include "../opengl/opengl_renderer_api.hpp"
#include <cstdint>

namespace OpenEngine {
    class RenderCommand
    {
        public:
            inline static void Init()
            {
                api->Init();
            }

            inline static void SetClearColor(const glm::vec4& color)
            {
                api->SetClearColor(color);
            }

            inline static void Clear()
            {
                api->Clear();
            }

            inline static void DrawIndexed(const std::shared_ptr<VertexArray>& vertex_array)
            {
                api->DrawIndexed(vertex_array);
            }

            inline static void SetViewport(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
            {
                api->SetViewport(x, y, width, height);
            }

        private:
            static inline RendererAPI* api = new OpenGLRendererAPI();
    };

}

#endif // RENDER_COMMAND_HPP
