Brenta Engine 1.2
Loading...
Searching...
No Matches
brenta::types::vao Class Reference

Vertex Array Object (VAO) More...

#include <vao.hpp>

Public Member Functions

 vao ()
 Default constructor, does nothing.
 
constexpr vao (const vao &)=delete
 
constexpr vaooperator= (const vao &)=delete
 
constexpr vao (vao &&other) noexcept
 
constexpr vaooperator= (vao &&other) noexcept
 
void init ()
 
void destroy ()
 
void bind () const
 
void unbind () const
 
unsigned int get_id () const
 
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.
 

Data Fields

unsigned int vao_id
 

Detailed Description

Vertex Array Object (VAO)

Wrapper for OpenGL Vertex Array Objects

Definition at line 22 of file vao.hpp.

Constructor & Destructor Documentation

◆ vao() [1/2]

vao::vao ( )

Default constructor, does nothing.

Definition at line 11 of file vao.cpp.

◆ vao() [2/2]

constexpr brenta::types::vao::vao ( vao &&  other)
inlineconstexprnoexcept

Definition at line 37 of file vao.hpp.

◆ ~vao()

vao::~vao ( )

Definition at line 15 of file vao.cpp.

Member Function Documentation

◆ bind()

void vao::bind ( ) const

Definition at line 34 of file vao.cpp.

◆ destroy()

void vao::destroy ( )

Definition at line 26 of file vao.cpp.

◆ get_id()

unsigned int vao::get_id ( ) const

Definition at line 49 of file vao.cpp.

◆ init()

void vao::init ( )

Definition at line 20 of file vao.cpp.

◆ operator=()

constexpr vao & brenta::types::vao::operator= ( vao &&  other)
inlineconstexprnoexcept

Definition at line 42 of file vao.hpp.

◆ set_vertex_data()

void vao::set_vertex_data ( buffer buffer,
unsigned int  index,
GLint  size,
GLenum  type,
GLboolean  is_normalized,
GLsizei  stride,
const void *  pointer 
)

Set the vertex data.

Parameters
bufferThe buffer object
indexThe index of the vertex attribute
sizeThe number of components per attribute
typeThe data type of each component
is_normalizedWhether the data should be normalized
strideThe byte offset between consecutive generic vertex attributes
pointerThe offset of the first component of the first generic vertex attribute in the array

Definition at line 56 of file vao.cpp.

◆ unbind()

void vao::unbind ( ) const

Definition at line 44 of file vao.cpp.

Field Documentation

◆ vao_id

unsigned int brenta::types::vao::vao_id

Definition at line 26 of file vao.hpp.


The documentation for this class was generated from the following files: