MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ vertex_layout_for()

template<typename T >
VertexLayout MayaFlux::Kakshya::vertex_layout_for ( )

Deduce a VertexLayout from a vertex struct type.

Definition at line 154 of file VertexFormats.hpp.

155{
156 if constexpr (std::is_same_v<T, PointVertex>) {
157 return VertexLayout::for_points();
158 } else if constexpr (std::is_same_v<T, LineVertex>) {
159 return VertexLayout::for_lines();
160 } else if constexpr (std::is_same_v<T, MeshVertex>) {
161 return VertexLayout::for_meshes();
162 } else if constexpr (std::is_same_v<T, Vertex>) {
163 return VertexLayout::for_raw();
164 } else {
165 static_assert(!std::is_same_v<T, T>,
166 "vertex_layout_for: unrecognised vertex type");
167 }
168}

References MayaFlux::Kakshya::VertexLayout::for_lines(), MayaFlux::Kakshya::VertexLayout::for_meshes(), MayaFlux::Kakshya::VertexLayout::for_points(), and MayaFlux::Kakshya::VertexLayout::for_raw().

+ Here is the call graph for this function: