summaryrefslogtreecommitdiff
path: root/src/GFX
diff options
context:
space:
mode:
Diffstat (limited to 'src/GFX')
-rw-r--r--src/GFX/Mesh.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/GFX/Mesh.hpp b/src/GFX/Mesh.hpp
index 1c39941..4aea8c6 100644
--- a/src/GFX/Mesh.hpp
+++ b/src/GFX/Mesh.hpp
@@ -10,7 +10,16 @@ namespace MC::GFX {
class Mesh {
public:
struct Attribute {
- template<uint S = 3, typename T = float>
+ template<typename T = F32>
+ Attribute(
+ std::vector<T> v
+ ) : data_size(v.size()),
+ attribute_size(1),
+ type_size(sizeof(T)) {
+ data = copy(v.data(), v.size() * type_size);
+ }
+
+ template<uint S = 3, typename T = F32>
Attribute(
std::vector<Vector<S, T>> v
) : data_size(v.size()),