refactor: state into namespace
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/state.h
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								src/state.h
									
									
									
									
									
								
							| @@ -6,12 +6,13 @@ | ||||
|  | ||||
| class Shader; | ||||
|  | ||||
| class State { | ||||
| public: | ||||
| 	static std::shared_ptr<Shader> default_shader_; | ||||
| 	static glm::mat4	       projection_matrix_; | ||||
| 	static glm::mat4	       view_matrix_; | ||||
| 	static glm::mat4	       model_matrix_; | ||||
| }; | ||||
| namespace state { | ||||
|  | ||||
| inline std::shared_ptr<Shader> default_shader	 = nullptr; | ||||
| inline glm::mat4	       projection_matrix = glm::mat4(1.0f); | ||||
| inline glm::mat4	       view_matrix	 = glm::mat4(1.0f); | ||||
| inline glm::mat4	       model_matrix	 = glm::mat4(1.0f); | ||||
|  | ||||
| } // namespace state | ||||
|  | ||||
| #endif // STATE_H_ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user