From 680d9d5b7a61ac955fcec8a5622faa5cf4165c11 Mon Sep 17 00:00:00 2001 From: Mel Date: Sun, 9 Jul 2023 20:51:30 +0200 Subject: Ambient occlusion (without corners) --- src/GFX/Mesh.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/GFX/Mesh.hpp') 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 + template + Attribute( + std::vector v + ) : data_size(v.size()), + attribute_size(1), + type_size(sizeof(T)) { + data = copy(v.data(), v.size() * type_size); + } + + template Attribute( std::vector> v ) : data_size(v.size()), -- cgit 1.4.1