18 typename std::enable_if<
sizeof...(Tail) == 0>::type applyLayoutImpl() {
21 static_assert(Size >= 4,
"Incompatible type for vertex layout (to small!)");
22 static_assert(Size % 4 == 0,
23 "Incompatible type for vertex layout (size not "
25 glVertexAttribPointer(Index,
30 reinterpret_cast<void*>(Offset));
31 glEnableVertexAttribArray(Index);
39 typename std::enable_if<
sizeof...(Tail) != 0>::type applyLayoutImpl() {
40 static_assert(Size >= 4,
"Incompatible type for vertex layout (to small!)");
41 static_assert(Size % 4 == 0,
42 "Incompatible type for vertex layout (size not "
46 glVertexAttribPointer(Index,
51 reinterpret_cast<void*>(Offset));
52 glEnableVertexAttribArray(Index);
53 applyLayoutImpl<Index + 1, Stride, Offset + Size, Tail...>();
56 template <
typename T,
typename... Ts>
58 static constexpr
int stride =
LayoutTypes<Ts...>::stride +
sizeof(T);
62 static constexpr
int stride =
sizeof(T);
Definition: VertexLayout.hpp:57