Added constructor with SharedVertexArrayObject argument
This commit is contained in:
parent
4231866d40
commit
3343369732
8
model.cc
8
model.cc
@ -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(){
|
||||||
|
4
model.hh
4
model.hh
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user