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