#ifndef OPENGL_VERTEX_ARRAY_HPP
#define OPENGL_VERTEX_ARRAY_HPP

#include "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 std::shared_ptr<VertexBuffer>& vertex_buffer) override;
            virtual void SetIndexBuffer(const std::shared_ptr<IndexBuffer>& index_buffer) override;

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

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

}

#endif // OPENGL_VERTEX_ARRAY_HPP
