Wrapper for OpenGL VAO (Vertex Array Object). Stores the configuration of vertex attributes (layout) and binds VBOs to shader inputs.
More...
#include <src/renderer/VertexArray.h>
Wrapper for OpenGL VAO (Vertex Array Object). Stores the configuration of vertex attributes (layout) and binds VBOs to shader inputs.
◆ VertexArray() [1/2]
| Renderer::VertexArray::VertexArray |
( |
| ) |
|
|
inline |
◆ ~VertexArray()
| Renderer::VertexArray::~VertexArray |
( |
| ) |
|
|
inline |
◆ VertexArray() [2/2]
| Renderer::VertexArray::VertexArray |
( |
const VertexArray & |
| ) |
|
|
delete |
◆ AttachIndexBuffer()
| void Renderer::VertexArray::AttachIndexBuffer |
( |
const IndexBuffer & |
ibo | ) |
const |
|
inline |
Attaches an IndexBuffer to this VAO using DSA.
- Parameters
-
◆ Bind()
| void Renderer::VertexArray::Bind |
( |
| ) |
const |
|
inline |
◆ LinkAttribute()
| void Renderer::VertexArray::LinkAttribute |
( |
const VertexBuffer & |
vbo, |
|
|
unsigned int |
iLayoutIndex, |
|
|
int |
iNumComponents, |
|
|
int |
iStride, |
|
|
int |
iOffset |
|
) |
| const |
|
inline |
Configures a vertex attribute layout.
- Parameters
-
| vbo | The VertexBuffer to read from. |
| iLayoutIndex | Shader layout location (e.g., layout(location = 0)). |
| iNumComponents | Number of components per vertex (e.g., 3 for vec3). |
| iStride | Total number of FLOATS between vertices. |
| iOffset | Number of FLOATS to skip to reach this attribute. |
◆ operator=()
◆ Unbind()
| void Renderer::VertexArray::Unbind |
( |
| ) |
const |
|
inline |
◆ m_RendererID
| unsigned int Renderer::VertexArray::m_RendererID |
The documentation for this class was generated from the following file: