Implemented model.cc
This commit is contained in:
parent
8091793b81
commit
613cfefbe6
13
model.cc
Normal file
13
model.cc
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include "model.hh"
|
||||||
|
|
||||||
|
Model::Model(std::string filePath) {
|
||||||
|
reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create();
|
||||||
|
reference->bind();
|
||||||
|
}
|
||||||
|
|
||||||
|
Model::~Model() {
|
||||||
|
}
|
||||||
|
|
||||||
|
ACGL::OpenGL::SharedVertexArrayObject Model::getReference() {
|
||||||
|
return reference;
|
||||||
|
}
|
6
model.hh
6
model.hh
@ -2,15 +2,15 @@
|
|||||||
#define MODEL_HH_INCLUDED
|
#define MODEL_HH_INCLUDED
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <ACGL/OpenGL/Creator/VertexArrayObjectCreator.hh>
|
||||||
|
|
||||||
class Model {
|
class Model {
|
||||||
public:
|
public:
|
||||||
Model(std::string filePath);
|
Model(std::string filePath);
|
||||||
~Model();
|
~Model();
|
||||||
void load();
|
ACGL::OpenGL::SharedVertexArrayObject getReference();
|
||||||
void render();
|
|
||||||
private:
|
private:
|
||||||
std::string filePath;
|
ACGL::OpenGL::SharedVertexArrayObject reference;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user