21 glm::vec3
color = glm::vec3(1.0F);
23 glm::vec2
uv = glm::vec2(0.0F);
24 glm::vec3
normal = glm::vec3(0.0F, 0.0F, 1.0F);
25 glm::vec3
tangent = glm::vec3(1.0F, 0.0F, 0.0F);
42 glm::vec3
color = glm::vec3(1.0F);
44 glm::vec2
uv = glm::vec2(0.0F);
45 glm::vec3
normal = glm::vec3(0.0F, 0.0F, 1.0F);
46 glm::vec3
tangent = glm::vec3(1.0F, 0.0F, 0.0F);
73 glm::vec3
color = glm::vec3(1.0F);
75 glm::vec2
uv = glm::vec2(0.0F);
76 glm::vec3
normal = glm::vec3(0.0F, 0.0F, 1.0F);
77 glm::vec3
tangent = glm::vec3(1.0F, 0.0F, 0.0F);
81 "PointVertex layout changed — update VertexLayout::for_points(), VertexAccess write helpers, and shaders");
83 "LineVertex layout changed — update VertexLayout::for_lines(), VertexAccess write helpers, and shaders");
85 "MeshVertex layout changed — must match PointVertex/LineVertex stride for FieldOperator compatibility");
88static_assert(offsetof(
MeshVertex,
color) == 12,
"color must be at offset 12");
89static_assert(offsetof(
MeshVertex,
weight) == 24,
"weight must be at offset 24");
90static_assert(offsetof(
MeshVertex, uv) == 28,
"uv must be at offset 28");
91static_assert(offsetof(
MeshVertex, normal) == 36,
"normal must be at offset 36");
92static_assert(offsetof(
MeshVertex, tangent) == 48,
"tangent must be at offset 48");
112 if constexpr (std::is_same_v<T, PointVertex>) {
114 }
else if constexpr (std::is_same_v<T, LineVertex>) {
116 }
else if constexpr (std::is_same_v<T, MeshVertex>) {
119 static_assert(!std::is_same_v<T, T>,
120 "vertex_layout_for: unrecognised vertex type");
std::optional< glm::vec3 > color
Kakshya::VertexLayout vertex_layout_for()
Deduce a VertexLayout from a vertex struct type.
Contains the node-based computational processing system components.
static VertexLayout for_lines(uint32_t stride=60)
Factory: layout for LineVertex (position, color, thickness, uv, normal, tangent)
static VertexLayout for_meshes(uint32_t stride=60)
Factory: layout for MeshVertex (position, color, weight, uv, normal, tangent)
static VertexLayout for_points(uint32_t stride=60)
Factory: layout for PointVertex (position, color, size, uv, normal, tangent)
Complete description of vertex data layout in a buffer.
Vertex type for line primitives (LINE_LIST / LINE_STRIP topology)
Vertex type for indexed triangle mesh primitives (TRIANGLE_LIST topology)
Vertex type for point primitives (POINT_LIST topology)
Vertex layout for textured quad geometry (position + UV).