refactor: state into namespace

This commit is contained in:
2025-10-13 17:17:28 +02:00
parent 4e2c62aaf4
commit 74a0bfca41
9 changed files with 19 additions and 27 deletions

View File

@@ -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_