3 #include "GLException.hpp"
4 #include "VertexSlot.hpp"
5 #include "VertexLayout.hpp"
6 #include "../service/StaticLogger.hpp"
11 template <
typename... Cs>
19 if(index >= m_slotCount) {
20 slogError(
"[VertexSet] Index <", index,
"> out of bounds <",
22 throw GLException(
"[VertexSet] Index out of bounds!");
26 auto* buf =
static_cast<char*
>(m_buffer)
31 int size() {
return m_slotCount; }
33 void* buf()
const {
return m_buffer; }
42 m_slotCount(vertexCount) {}
45 friend ::lumina::HotVertexSeq<Cs...>;
55 if(index >= m_slotCount) {
56 slogError(
"[VertexSet] Index <", index,
"> out of bounds <",
58 throw GLException(
"[VertexSet] Index out of bounds!");
62 auto* buf =
static_cast<char*
>(m_buffer)
63 + index * m_slotSize *
sizeof(
float);
67 int size() {
return m_slotCount; }
69 void* buf()
const {
return m_buffer; }
79 m_slotCount(vertexCount),
80 m_slotSize(slotSize) {}
83 friend ::lumina::HotVertexSeq<>;
Definition: VertexSlot.hpp:52
Definition: GLException.hpp:7
Definition: VertexSet.hpp:12
Definition: VertexSlot.fpp:7
Definition: VertexLayout.hpp:57