Add refraction
[opengl.git] / model.hpp
index a39c70a0651eb8043cd14bbb9ea4e0567bba85d9..e0c8a2d93acd0a4e7fedcd542bcc4a36cb1746a9 100644 (file)
--- a/model.hpp
+++ b/model.hpp
@@ -8,6 +8,8 @@
 #include <assimp/scene.h>
 #include <assimp/Importer.hpp>
 #include "material.hpp"
+#include "program.hpp"
+#include "skybox.hpp"
 
 class Model {
 
@@ -18,13 +20,13 @@ class Model {
        };
        
        public:
-               Model(const std::string &path, GLuint progId);
+               Model(const std::string &path, Program p, Skybox s);
                void draw() const;
 
                class Node {
                        public:
                                Node(const aiNode &aiNode, GLuint progId);
-                               void draw(const std::vector<Mesh> &meshes, const std::vector<Material> &materials, glm::mat4 parentModel) const;
+                               void draw(const std::vector<Mesh> &meshes, const std::vector<Material> &materials, const Skybox s, glm::mat4 parentModel) const;
                                const std::vector<Node*> &getChildren() const { return children; }
                                Node* findNode(const aiNode &aiNode);
                                glm::mat4 model = glm::mat4(1);
@@ -40,7 +42,8 @@ class Model {
                Node* find(const std::string &name);
        
        private:
-               const GLuint progId;
+               const Program program;
+               const Skybox skybox;
                
                std::vector<Mesh> meshes;
                Node *root;