Claire's Game Engine
Full C++ Engine using OpenGL
|
VertexArray is a class that encapsulates an OpenGL Vertex Array Object (VAO) and its associated buffers. It handles the creation and management of vertex buffers and index buffers, along with setting up the appropriate vertex attributes for rendering. This class is used to store and manage vertex data in memory for rendering purposes in OpenGL. More...
#include <VertexArray.h>
Public Member Functions | |
VertexArray (const float *pVertices, unsigned int pVerticeCount) | |
Constructor for VertexArray. Initializes and creates a vertex array object (VAO) and its associated buffers using the provided vertex data. | |
~VertexArray () | |
Destructor for VertexArray. Cleans up and deletes the VAO and buffers from OpenGL memory. | |
void | SetActive () |
Binds the vertex array to be the current active vertex array in OpenGL. | |
unsigned int | GetVerticeCount () const |
Gets the count of vertices in the vertex array. | |
VertexArray is a class that encapsulates an OpenGL Vertex Array Object (VAO) and its associated buffers. It handles the creation and management of vertex buffers and index buffers, along with setting up the appropriate vertex attributes for rendering. This class is used to store and manage vertex data in memory for rendering purposes in OpenGL.
VertexArray::VertexArray | ( | const float * | pVertices, |
unsigned int | pVerticeCount ) |
Constructor for VertexArray. Initializes and creates a vertex array object (VAO) and its associated buffers using the provided vertex data.
pVertices | A pointer to an array of vertex data. |
pVerticeCount | The number of vertices in the array. |
VertexArray::~VertexArray | ( | ) |
Destructor for VertexArray. Cleans up and deletes the VAO and buffers from OpenGL memory.
unsigned int VertexArray::GetVerticeCount | ( | ) | const |
Gets the count of vertices in the vertex array.
void VertexArray::SetActive | ( | ) |
Binds the vertex array to be the current active vertex array in OpenGL.