feat: add lights
This commit is contained in:
		| @@ -3,6 +3,8 @@ | ||||
|  | ||||
| #include <memory> | ||||
|  | ||||
| #include "../lib/glm/glm.hpp" | ||||
|  | ||||
| class Shader; | ||||
| class Texture; | ||||
|  | ||||
| @@ -25,11 +27,31 @@ public: | ||||
| 		texture_ = tex; | ||||
| 	} | ||||
|  | ||||
| 	[[nodiscard]] const glm::vec4& color() const | ||||
| 	{ | ||||
| 		return color_; | ||||
| 	} | ||||
| 	void set_color(const glm::vec4& color) | ||||
| 	{ | ||||
| 		color_ = color; | ||||
| 	} | ||||
|  | ||||
| 	[[nodiscard]] uint8_t shininess() const | ||||
| 	{ | ||||
| 		return shininess_; | ||||
| 	} | ||||
| 	void set_shininess(uint8_t shininess) | ||||
| 	{ | ||||
| 		shininess_ = shininess; | ||||
| 	} | ||||
|  | ||||
| 	void prepare(); | ||||
|  | ||||
| private: | ||||
| 	std::shared_ptr<Shader>	 shader_; | ||||
| 	std::shared_ptr<Texture> texture_; | ||||
| 	glm::vec4		 color_; | ||||
| 	uint8_t			 shininess_; | ||||
| }; | ||||
|  | ||||
| #endif // MATERIAL_H_ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user