summaryrefslogtreecommitdiffstats
path: root/Project/VertexBuffer.h
blob: e0d595000b9388d8cb3420550f217cc72671c5c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef VERTEXBUFFER_H
#define VERTEXBUFFER_H

#include <GL/glew.h>

class VertexBuffer
{
public:
    //VertexBuffer() {}
    VertexBuffer(const void* data, unsigned int size, unsigned int usage = GL_STATIC_DRAW);
    ~VertexBuffer();

    void SetSubData(const void* data, const unsigned int& size) const;

    void Bind() const;
    void Unbind() const;

protected:
    unsigned int m_rendererID = 0;
};
#endif