Brenta Engine 1.2
Loading...
Searching...
No Matches
vao.hpp
1// SPDX-License-Identifier: MIT
2// Author: Giovanni Santini
3// Mail: giovanni.santini@proton.me
4// Github: @San7o
5
6#pragma once
7
8#include <brenta/buffer.hpp>
9#include <glad/glad.h>
10
11namespace brenta
12{
13
14namespace types
15{
16
22class vao
23{
24public:
28 unsigned int vao_id;
29
36 {
37 }
43 void init();
44
49 unsigned int get_vao();
53 void bind();
57 void unbind();
61 void destroy();
75 void set_vertex_data(buffer buffer, unsigned int index, GLint size,
76 GLenum type, GLboolean is_normalized, GLsizei stride,
77 const void *pointer);
78};
79
80} // namespace types
81
82} // namespace brenta
Buffer wrapper around OpenGL buffer objects.
Definition buffer.hpp:30
Vertex Array Object (VAO)
Definition vao.hpp:23
void bind()
Bind the VAO.
Definition vao.cpp:26
void set_vertex_data(buffer buffer, unsigned int index, GLint size, GLenum type, GLboolean is_normalized, GLsizei stride, const void *pointer)
Set the vertex data.
Definition vao.cpp:41
unsigned int vao_id
Vertex Array Object (VAO)
Definition vao.hpp:28
unsigned int get_vao()
Get the VAO.
Definition vao.cpp:16
void unbind()
Unbind the VAO.
Definition vao.cpp:36
void init()
Init Constructor.
Definition vao.cpp:11
void destroy()
Delete the VAO.
Definition vao.cpp:53
vao()
Empty Constructor.
Definition vao.hpp:35