diff options
Diffstat (limited to 'src/GFX/Mesh.hpp')
| -rw-r--r-- | src/GFX/Mesh.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/GFX/Mesh.hpp b/src/GFX/Mesh.hpp index ec21e53..1c39941 100644 --- a/src/GFX/Mesh.hpp +++ b/src/GFX/Mesh.hpp @@ -2,7 +2,7 @@ #include <utility> #include <vector> -#include <cstdint> +#include "../Common/Sizes.hpp" #include "../Math/Common.hpp" namespace MC::GFX { @@ -10,7 +10,7 @@ namespace MC::GFX { class Mesh { public: struct Attribute { - template<size_t S = 3, typename T = float> + template<uint S = 3, typename T = float> Attribute( std::vector<Vector<S, T>> v ) : data_size(v.size()), @@ -26,21 +26,21 @@ public: attribute_size(other.attribute_size), type_size(other.type_size) {} - static void* copy(void* ptr, uint32_t size) { - auto* buffer = new uint8_t[size]; - std::copy_n((uint8_t*)ptr, size, buffer); + static void* copy(void* ptr, U32 size) { + auto* buffer = new U8[size]; + std::copy_n((U8*)ptr, size, buffer); return buffer; } void* data; - long data_size; - int attribute_size; - int type_size; + USize data_size; + USize attribute_size; + USize type_size; }; Mesh( std::vector<Attribute> attributes, - std::vector<uint32_t> indices + std::vector<U32> indices ) : m_attributes(std::move(attributes)), m_indices(std::move(indices)) {} @@ -48,12 +48,12 @@ public: std::vector<Attribute> attributes ) : m_attributes(std::move(attributes)) {} - const std::vector<uint32_t>& indices() const; + const std::vector<U32>& indices() const; const std::vector<Attribute>& attributes() const; private: std::vector<Attribute> m_attributes; - std::vector<uint32_t> m_indices; + std::vector<U32> m_indices; }; } \ No newline at end of file |
