Loading...
Searching...
No Matches
VA.cpp
Go to the documentation of this file.
1#include "VA.h"
2
3#include <GL/glew.h>
4#include <glm/detail/type_int.hpp>
5
6VA::VA()
7{
8 glGenVertexArrays(1, &m_renderer_id_);
9}
10
11VA::~VA()
12{
13 glDeleteVertexArrays(1, &m_renderer_id_);
14}
15
16void VA::bind() const {
17 glBindVertexArray(m_renderer_id_);
18}
19
20void VA::unbind()
21{
22 glBindVertexArray(0);
23}
24
25uint32_t VA::get_id() const {
26 return m_renderer_id_;
27}
Definition VA.h:7
void bind() const
Definition VA.cpp:16
uint32_t m_renderer_id_
Definition VA.h:8
~VA()
Definition VA.cpp:11
VA()
Definition VA.cpp:6
uint32_t get_id() const
Definition VA.cpp:25
void unbind()
Definition VA.cpp:20