Add basics of materials
[opengl.git] / material.hpp
diff --git a/material.hpp b/material.hpp
new file mode 100644 (file)
index 0000000..968ea36
--- /dev/null
@@ -0,0 +1,24 @@
+#include <string>
+#ifdef __APPLE__
+#include <GL/glew.h>
+#else
+#include <OpenGL/glew.h>
+#endif
+#include <assimp/scene.h>
+
+class Material {
+       public:
+               Material(const aiMaterial &aiMaterial, GLuint progId);
+               void bind() const;
+       private:
+               GLuint progId;
+               aiColor3D ambient, diffuse, specular;
+               ai_real shininess;
+
+               struct Texture {
+                       Texture(const std::string &path);
+                       GLuint texId;
+               };
+               Texture *texture = nullptr;
+};
+