diff options
| author | Mel <einebeere@gmail.com> | 2023-07-09 20:51:30 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-07-09 20:51:30 +0200 |
| commit | 680d9d5b7a61ac955fcec8a5622faa5cf4165c11 (patch) | |
| tree | 385ada2ac5e666ff4e89e073850c9e1a9b29c99e /src/GFX | |
| parent | fe2baedc760c2f29e2c720f6b1132a2de33c5430 (diff) | |
| download | meowcraft-680d9d5b7a61ac955fcec8a5622faa5cf4165c11.tar.zst meowcraft-680d9d5b7a61ac955fcec8a5622faa5cf4165c11.zip | |
Ambient occlusion (without corners)
Diffstat (limited to 'src/GFX')
| -rw-r--r-- | src/GFX/Mesh.hpp | 11 |
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()), |
