Loading...
Searching...
No Matches
VB.cpp
Go to the documentation of this file.
1#include "VB.h"
2#include <GL/glew.h>
3
4VB::VB()
5{
6 glGenBuffers(1, &m_renderer_id_);
7}
8
9VB::~VB()
10{
11 glDeleteBuffers(1, &m_renderer_id_);
12}
13
14void VB::bind()
15{
16 glBindBuffer(GL_ARRAY_BUFFER, m_renderer_id_);
17}
18
19void VB::unbind()
20{
21 glBindBuffer(GL_ARRAY_BUFFER, 0);
22
23}
Definition VB.h:7
void unbind()
Definition VB.cpp:19
~VB()
Definition VB.cpp:9
uint32_t m_renderer_id_
Definition VB.h:8
void bind()
Definition VB.cpp:14
VB()
Definition VB.cpp:4