AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
gl::Vao Class Reference

Classes

struct  Buffer
 

Public Member Functions

 Vao (const Vao &)=delete
 
const AVector< Buffer > & getBuffers () const noexcept
 
void bind () const noexcept
 
template<typename T >
void insert (GLuint index, AArrayView< T > data, const char *key)
 Creates VBO or modifies existing one. More...
 
template<typename T >
void insertIfKeyMismatches (GLuint index, AArrayView< T > data, const char *key)
 Creates VBO or modifies existing one, if the key pointer mismatches. More...
 
void indices (AArrayView< GLuint > data)
 Uploads VBO indices. More...
 
void drawArrays (GLenum type, GLsizei count)
 
void drawElements (GLenum type=GL_TRIANGLES)
 Draws buffer. Don't forget to upload indices with indices function/. More...
 

Static Public Member Functions

static void unbind () noexcept
 

Member Function Documentation

◆ drawElements()

void gl::Vao::drawElements ( GLenum  type = GL_TRIANGLES)

Draws buffer. Don't forget to upload indices with indices function/.

Parameters
typePrimitive type

◆ indices()

void gl::Vao::indices ( AArrayView< GLuint >  data)

Uploads VBO indices.

Parameters
dataindices

◆ insert()

template<typename T >
void gl::Vao::insert ( GLuint  index,
AArrayView< T >  data,
const char *  key 
)
inline

Creates VBO or modifies existing one.

Parameters
indexindex in VAO
datavertex data
keysee gl::Vao::Buffer::lastModifierKey

◆ insertIfKeyMismatches()

template<typename T >
void gl::Vao::insertIfKeyMismatches ( GLuint  index,
AArrayView< T >  data,
const char *  key 
)
inline

Creates VBO or modifies existing one, if the key pointer mismatches.

Parameters
indexindex in VAO
datavertex data
keysee gl::Vao::Buffer::lastModifierKey

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