65 uint32_t max_offset = 0;
66 uint32_t last_size = 0;
70 max_offset = std::max(max_offset, attr.offset_in_vertex);
71 if (attr.offset_in_vertex == max_offset) {
72 last_size = attr_size;
92 return sizeof(glm::vec3);
95 return sizeof(glm::vec2);
98 return sizeof(glm::vec4);
102 return sizeof(double);
DataModality
Data modality types for cross-modal analysis.
@ AUDIO_MULTICHANNEL
Multi-channel audio.
@ AUDIO_1D
1D audio signal
std::string name
Optional name for debugging/introspection e.g., "position", "normal", "texCoord".
uint32_t offset_in_vertex
Byte offset of this attribute within one vertex e.g., position at 0, normal at 12,...
DataModality component_modality
Semantic type of this attribute e.g., VERTEX_POSITIONS_3D → vec3, TEXTURE_COORDS_2D → vec2.
Semantic description of a single vertex attribute.
uint32_t stride_bytes
Total bytes per vertex (stride in Vulkan terms) e.g., 3 floats (position) + 3 floats (normal) = 24 by...
uint32_t vertex_count
Total number of vertices in this buffer.
static uint32_t modality_size_bytes(DataModality mod)
Get size in bytes for a given modality Mirrors VKBuffer::get_format() logic.
void compute_stride()
Helper: compute stride from attributes if not explicitly set.
std::vector< VertexAttributeLayout > attributes
All attributes that make up one vertex Ordered by shader location (0, 1, 2, ...)
Complete description of vertex data layout in a buffer.