|
Monad Engine da02fba2
> Undercity Codex_
|
Describes one interleaved vertex attribute within a VBO. More...
#include <VertexLayout.h>
Public Attributes | |
| GLuint | index |
| Shader attribute location (layout(location = N)). | |
| GLuint | size |
| Number of components (e.g. 3 for a vec3 position). | |
| GLuint | type |
| GL data type constant (e.g. GL_FLOAT). | |
| uint32_t | offset |
| Byte offset from the start of one vertex. | |
Static Public Attributes | |
| static constexpr int | PositionIndex = 0 |
| Canonical attribute slot indices — must match the GLSL layout locations. | |
| static constexpr int | ColorIndex = 1 |
| layout(location = 1) vec3 aColor | |
| static constexpr int | UVIndex = 2 |
| layout(location = 2) vec2 aUV | |
| static constexpr int | NormalIndex = 3 |
| layout(location = 3) vec3 aNormal | |
| static constexpr int | BoneIndicesIndex = 4 |
| layout(location = 4) ivec4 aBoneIndices | |
| static constexpr int | BoneWeightsIndex = 5 |
| layout(location = 5) vec4 aBoneWeights | |
Describes one interleaved vertex attribute within a VBO.
Maps directly to a glVertexAttribPointer call:
index → attrib location in the vertex shader.size → component count (1–4).type → GL data type (typically GL_FLOAT).offset → byte offset from the start of the vertex struct. Definition at line 42 of file VertexLayout.h.
|
staticconstexpr |
layout(location = 4) ivec4 aBoneIndices
Definition at line 55 of file VertexLayout.h.
|
staticconstexpr |
layout(location = 5) vec4 aBoneWeights
Definition at line 56 of file VertexLayout.h.
|
staticconstexpr |
layout(location = 1) vec3 aColor
Definition at line 52 of file VertexLayout.h.
Referenced by mnd::Mesh::CreateBox(), mnd::Mesh::CreateCube(), and mnd::ParseGLTFNode().
| GLuint mnd::VertexElement::index |
Shader attribute location (layout(location = N)).
Definition at line 44 of file VertexLayout.h.
Referenced by mnd::ParseGLTFNode().
|
staticconstexpr |
layout(location = 3) vec3 aNormal
Definition at line 54 of file VertexLayout.h.
Referenced by mnd::Mesh::CreateBox(), mnd::Mesh::CreateCapsule(), mnd::Mesh::CreateCube(), mnd::Mesh::CreateSphere(), and mnd::ParseGLTFNode().
| uint32_t mnd::VertexElement::offset |
Byte offset from the start of one vertex.
Definition at line 47 of file VertexLayout.h.
Referenced by mnd::ParseGLTFNode().
|
staticconstexpr |
Canonical attribute slot indices — must match the GLSL layout locations.
layout(location = 0) vec3 aPosition
Definition at line 51 of file VertexLayout.h.
Referenced by mnd::Mesh::CreateBox(), mnd::Mesh::CreateCapsule(), mnd::Mesh::CreateCube(), mnd::Mesh::CreateSphere(), and mnd::ParseGLTFNode().
| GLuint mnd::VertexElement::size |
Number of components (e.g. 3 for a vec3 position).
Definition at line 45 of file VertexLayout.h.
Referenced by mnd::ParseGLTFNode().
| GLuint mnd::VertexElement::type |
GL data type constant (e.g. GL_FLOAT).
Definition at line 46 of file VertexLayout.h.
Referenced by mnd::ParseGLTFNode().
|
staticconstexpr |
layout(location = 2) vec2 aUV
Definition at line 53 of file VertexLayout.h.
Referenced by mnd::Mesh::CreateBox(), mnd::Mesh::CreateCapsule(), mnd::Mesh::CreateCube(), mnd::Mesh::CreateSphere(), and mnd::ParseGLTFNode().