#ifndef OPENGL_VERTEX_ARRAY_HPP
#define OPENGL_VERTEX_ARRAY_HPP

#include "open_engine/renderer/vertex_array.hpp"

namespace OpenEngine {
    class OpenGLVertexArray : public VertexArray
    {
        public:
            OpenGLVertexArray();
            ~OpenGLVertexArray();

            virtual void Bind() const override;
            virtual void UnBind() const override;

            virtual void AddVertexBuffer(const Ref<VertexBuffer>& vertex_buffer) override;
            virtual void SetIndexBuffer(const Ref<IndexBuffer>& index_buffer) override;

            virtual const std::vector<Ref<VertexBuffer>>& GetVertexBuffers() const override { return vertex_buffers; };
            virtual const Ref<IndexBuffer>& GetIndexBuffer() const override { return index_buffer; };

        private:
            uint32_t id;
            uint32_t index = 0;
            std::vector<Ref<VertexBuffer>> vertex_buffers;
            Ref<IndexBuffer> index_buffer;
    };
}

#endif // OPENGL_VERTEX_ARRAY_HPP
