hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/rendering/vertex_array.h
blob: 946f273835a313815c894da3b63ebc39947c9a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include "vertex_buffer.h"
#include "index_buffer.h"
#include <memory>
#include <vector>

namespace Donut
{
    class VertexArray 
    {
    public:
        virtual ~VertexArray() = default;

        virtual void bind()   const = 0;
        virtual void unbind() const = 0;

        virtual void add_vertex_buffer(const std::shared_ptr<VertexBuffer>& vertex_buffer) = 0;
        virtual void set_index_buffer(const std::shared_ptr<IndexBuffer>& index_buffer)    = 0;

        virtual const std::vector<std::shared_ptr<VertexBuffer>>& get_vertex_buffers() const = 0;
        virtual const std::shared_ptr<IndexBuffer>& get_index_buffer()                 const = 0;

        static VertexArray* create();
    };
};