hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/rendering/vertex_array.h
blob: a39849f42afb613eca5909a1305d383a471f0a96 (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
27
28
#pragma once

#include "core/memory.h"

#include "vertex_buffer.h"
#include "index_buffer.h"

#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 Ref<VertexBuffer>& vertex_buffer) = 0;
        virtual void set_index_buffer(const Ref<IndexBuffer>& index_buffer)    = 0;

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

        static VertexArray* create();
    };
};