remove Mesh constructor 'attrs' argument & format Mesh.hpp

This commit is contained in:
MihailRis
2025-04-27 01:13:44 +03:00
parent 47b7472231
commit e357a4eb9f
13 changed files with 46 additions and 42 deletions
+2 -3
View File
@@ -18,7 +18,7 @@ struct VertexAttribute {
bool normalized = false;
ubyte count = 0;
[[nodiscard]] uint32_t size() const {
[[nodiscard]] constexpr uint32_t size() const {
switch (type) {
case Type::FLOAT:
return count * sizeof(float);
@@ -31,9 +31,8 @@ struct VertexAttribute {
case Type::UNSIGNED_BYTE:
case Type::BYTE:
return count * sizeof(int8_t);
default:
throw std::runtime_error("VertexAttribute type is not supported");
}
return 0;
}
};