From fe2baedc760c2f29e2c720f6b1132a2de33c5430 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 8 Jul 2023 03:25:44 +0200 Subject: Use own size types --- src/GFX/Mesh.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/GFX/Mesh.hpp') 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 #include -#include +#include "../Common/Sizes.hpp" #include "../Math/Common.hpp" namespace MC::GFX { @@ -10,7 +10,7 @@ namespace MC::GFX { class Mesh { public: struct Attribute { - template + template Attribute( std::vector> 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 attributes, - std::vector indices + std::vector indices ) : m_attributes(std::move(attributes)), m_indices(std::move(indices)) {} @@ -48,12 +48,12 @@ public: std::vector attributes ) : m_attributes(std::move(attributes)) {} - const std::vector& indices() const; + const std::vector& indices() const; const std::vector& attributes() const; private: std::vector m_attributes; - std::vector m_indices; + std::vector m_indices; }; } \ No newline at end of file -- cgit 1.4.1