From 646efa9383232954565c541247b9d092f6826b51 Mon Sep 17 00:00:00 2001 From: Djalim Simaila Date: Fri, 24 Oct 2025 09:50:00 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(engine):=20store=20Mesh3D?= =?UTF-8?q?=20objects=20as=20unique=5Fptr=20for=20safer=20memory=20handlin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/Mesh3D.h | 1 + include/engine.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/Mesh3D.h b/include/Mesh3D.h index 2a6946e..c4f4abd 100644 --- a/include/Mesh3D.h +++ b/include/Mesh3D.h @@ -13,6 +13,7 @@ namespace djalim { Mesh3D(const std::string& filepath); std::vector meshVertices; int numMeshVertices = 0; + int numFaces = 0; void loadOBJFile(const std::string& filepath); Texture2D texture; GLuint VBO; diff --git a/include/engine.h b/include/engine.h index 98f351a..0b5918f 100644 --- a/include/engine.h +++ b/include/engine.h @@ -6,6 +6,7 @@ #include "ShaderProgram.h" #include "Texture2D.h" #include +#include #include #include #include @@ -21,7 +22,7 @@ struct Object3D { GLuint VAO; }; -typedef std::map Objects3D; +typedef std::map> Objects3D; static bool gWireframe = false;