X-Git-Url: http://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=material.hpp;fp=material.hpp;h=968ea3651355780391fe6e897c973411b8181a44;hp=0000000000000000000000000000000000000000;hb=37cba564a96018a5500e942498d4e48c0ebe73ed;hpb=ba5e08bf25de722d907748ce55b27a45b2b270bf diff --git a/material.hpp b/material.hpp new file mode 100644 index 0000000..968ea36 --- /dev/null +++ b/material.hpp @@ -0,0 +1,24 @@ +#include +#ifdef __APPLE__ +#include +#else +#include +#endif +#include + +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; +}; +