projects
/
opengl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add basics of materials
[opengl.git]
/
material.hpp
1
#include <string>
2
#ifdef __APPLE__
3
#include <GL/glew.h>
4
#else
5
#include <OpenGL/glew.h>
6
#endif
7
#include <assimp/scene.h>
8
9
class Material {
10
public:
11
Material(const aiMaterial &aiMaterial, GLuint progId);
12
void bind() const;
13
private:
14
GLuint progId;
15
aiColor3D ambient, diffuse, specular;
16
ai_real shininess;
17
18
struct Texture {
19
Texture(const std::string &path);
20
GLuint texId;
21
};
22
Texture *texture = nullptr;
23
};
24