From ad84d0686f1d7f72e86b55cdadd8272f225f776d Mon Sep 17 00:00:00 2001 From: Mel Date: Sun, 23 Oct 2022 21:28:09 +0200 Subject: Modular mesh vertex attributes --- src/GFX/Mesh.cpp | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'src/GFX/Mesh.cpp') diff --git a/src/GFX/Mesh.cpp b/src/GFX/Mesh.cpp index 1bac9f1..b0271bb 100644 --- a/src/GFX/Mesh.cpp +++ b/src/GFX/Mesh.cpp @@ -2,36 +2,12 @@ namespace MC::GFX { -float* Mesh::raw() { - return (float*) m_positions.data(); +std::vector Mesh::indices() { + return m_indices; } -size_t Mesh::size() { - return m_positions.size(); -} - -float* Mesh::raw_normals() { - return (float*) m_normals.data(); -} - -size_t Mesh::normals_size() { - return m_normals.size(); -} - -uint32_t* Mesh::raw_indices() { - return m_indices.data(); -} - -size_t Mesh::indices_size() { - return m_indices.size(); -} - -float* Mesh::raw_tex_coords() { - return (float*) m_tex_coords.data(); -} - -size_t Mesh::tex_coords_size() { - return m_tex_coords.size(); +std::vector Mesh::attributes() { + return m_attributes; } } \ No newline at end of file -- cgit 1.4.1