Mesh duplication

This commit is contained in:
Dane Johnson
2021-01-23 13:00:08 -06:00
parent cff580b7f1
commit f69da37599
7 changed files with 51 additions and 1 deletions

View File

@@ -51,6 +51,11 @@ Mesh::~Mesh() {
}
}
Mesh *Mesh::Duplicate() {
Mesh *dup = new Mesh(*this);
return dup;
}
void Mesh::SetupMesh() {
for (SubMesh *sub : submeshes) {
sub->SetupSubMesh();

View File

@@ -44,6 +44,7 @@ public:
virtual bool IsDrawable() const {return true;}
virtual void Draw(Shader *shader);
virtual Name GetType() const;
Mesh *Duplicate();
protected:
SubMeshList submeshes;
virtual void SetupMesh();