Added constructor with SharedVertexArrayObject argument

This commit is contained in:
Steffen Fündgens 2014-11-14 17:34:50 +01:00
parent 4231866d40
commit 3343369732
2 changed files with 5 additions and 7 deletions

View File

@ -2,14 +2,12 @@
Model::Model(std::string filePath, float scale) { Model::Model(std::string filePath, float scale) {
reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create(); reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create();
reference->bind();
this->scale = scale; this->scale = scale;
} }
Model::Model(std::string filePath) { Model::Model(ACGL::OpenGL::SharedVertexArrayObject vao, float scale){
reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create(); reference = vao;
reference->bind(); this->scale = scale;
this->scale = 1.0f;
} }
Model::Model(){ Model::Model(){

View File

@ -6,8 +6,8 @@
class Model { class Model {
public: public:
Model(std::string filePath, float scale); Model(std::string filePath, float scale=1.0f);
Model(std::string filePath); Model(ACGL::OpenGL::SharedVertexArrayObject vao, float scale=1.0f);
Model(); Model();
~Model(); ~Model();
ACGL::OpenGL::SharedVertexArrayObject getReference(); ACGL::OpenGL::SharedVertexArrayObject getReference();