projects
/
opengl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extra skyboxes
[opengl.git]
/
model.cpp
diff --git
a/model.cpp
b/model.cpp
index 5ffe05a4e59f71e305fddcad42ea1dedd264328f..ee1159532728a0a834705fa9de8eb9dd91c35932 100644
(file)
--- a/
model.cpp
+++ b/
model.cpp
@@
-146,7
+146,7
@@
void Model::Node::draw( const std::vector<Mesh> &meshes,
for (Node *child: children) child->draw(meshes, materials, skybox, m);
}
for (Node *child: children) child->draw(meshes, materials, skybox, m);
}
-Model::Model(const std::string &path, Program p
, Skybox s): program(p), skybox(s
) {
+Model::Model(const std::string &path, Program p
): program(p
) {
glUseProgram(p.progId);
const aiScene *scene = importer.ReadFile(path,
glUseProgram(p.progId);
const aiScene *scene = importer.ReadFile(path,
@@
-169,7
+169,7
@@
Model::Model(const std::string &path, Program p, Skybox s): program(p), skybox(s
root = new Node(*(scene->mRootNode), p.progId);
}
root = new Node(*(scene->mRootNode), p.progId);
}
-void Model::draw() const {
+void Model::draw(
Skybox skybox
) const {
glUseProgram(program.progId);
root->draw(meshes, materials, skybox);
program.validate();
glUseProgram(program.progId);
root->draw(meshes, materials, skybox);
program.validate();