7#include <initializer_list>
19 Attribute(std::string_view name, Format fmt, uint32_t offset = -1,
bool normalized =
false)
20 : name(name), format(fmt), offset(offset), normalized(normalized)
24 Attribute(uint32_t location, std::string_view name, Format fmt,
bool normalized =
false)
25 : location(location), name(name), format(fmt), normalized(normalized)
29 uint32_t get_size()
const;
31 uint32_t location = -1;
32 std::string_view name;
34 bool normalized =
false;
39 VertexFormat(
const std::initializer_list<Attribute>& list);
43 const std::vector<Attribute> get_attributes()
const;
45 void set_stride(uint32_t stride);
46 uint32_t get_stride()
const;
49 std::vector<Attribute> attribs_;