CSCI441 OpenGL Library 5.9.0
CS@Mines CSCI441 Computer Graphics Course Library
Loading...
Searching...
No Matches
modelMaterial.hpp
Go to the documentation of this file.
1
12#ifndef CSCI441_MODEL_MATERIAL_H
13#define CSCI441_MODEL_MATERIAL_H
14
15#ifdef CSCI441_USE_GLEW
16 #include <GL/glew.h>
17#else
18 #include <glad/gl.h>
19#endif
20
21#include <glm/ext/vector_float4.hpp>
22
23namespace CSCI441_INTERNAL {
24
25 struct ModelMaterial {
26 glm::vec4 ambient;
27 glm::vec4 diffuse;
28 glm::vec4 specular;
29 GLfloat shininess;
30 [[maybe_unused]] glm::vec4 emissive;
31
32 GLuint map_Kd;
33 [[maybe_unused]] GLuint map_d;
34
35 ModelMaterial() :
36 shininess(0.0f),
37 map_Kd(0),
38 map_d(0) {
39 for(size_t i = 0; i < 3; i++) {
40 ambient[i] = diffuse[i] = specular[i] = emissive[i] = 0.0f;
41 }
42 ambient[3] = diffuse[3] = specular[3] = emissive[3] = 1.0f;
43 }
44 };
45
46 enum class MODEL_TYPE {OBJ, OFF, PLY, STL};
47}
48
49#endif // CSCI441_MODEL_MATERIAL_H