diff --git a/model.cc b/model.cc index 1800572..22e0e7c 100644 --- a/model.cc +++ b/model.cc @@ -2,14 +2,12 @@ Model::Model(std::string filePath, float scale) { reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create(); - reference->bind(); this->scale = scale; } -Model::Model(std::string filePath) { - reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create(); - reference->bind(); - this->scale = 1.0f; +Model::Model(ACGL::OpenGL::SharedVertexArrayObject vao, float scale){ + reference = vao; + this->scale = scale; } Model::Model(){ diff --git a/model.hh b/model.hh index 70391d6..e73c4e9 100644 --- a/model.hh +++ b/model.hh @@ -6,8 +6,8 @@ class Model { public: - Model(std::string filePath, float scale); - Model(std::string filePath); + Model(std::string filePath, float scale=1.0f); + Model(ACGL::OpenGL::SharedVertexArrayObject vao, float scale=1.0f); Model(); ~Model(); ACGL::OpenGL::SharedVertexArrayObject getReference();