#include <VertexArray.h>
Definition at line 6 of file VertexArray.h.
◆ VertexArray()
| VertexArray::VertexArray |
( |
| ) |
|
◆ ~VertexArray()
| VertexArray::~VertexArray |
( |
| ) |
|
◆ AddBuffer()
Definition at line 16 of file VertexArray.cpp.
17{
19 vb.Bind();
20 const auto& elements = layout.GetElements();
21 unsigned int offset = 0;
22 for (unsigned int i = 0; i < elements.size(); i++)
23 {
24 const auto& element = elements[i];
25 GLCall(glEnableVertexAttribArray(i));
26 GLCall(glVertexAttribPointer(i, element.count, element.type, element.normalized, layout.GetStride(), (
const void*)offset));
28 }
29}
static unsigned int GetSizeOfType(unsigned int type)
◆ Bind()
| void VertexArray::Bind |
( |
| ) |
const |
◆ Unbind()
| void VertexArray::Unbind |
( |
| ) |
const |
◆ m_RendererID
| unsigned int VertexArray::m_RendererID |
|
private |
The documentation for this class was generated from the following files: