1 #ifndef STATE_MANAGER_H_
2 #define STATE_MANAGER_H_
4 #include <gmath/gmath.h>
18 std::map<std::string, int> statemap;
19 State *get_state(const char *name);
22 std::vector<State> states;
25 adds a state returns an idx:
26 the num_floats indicates the number of floats that form
29 a float value consists of 1 float => num_floats = 1,
30 a Vec2 consists of 2 floats, a Vec3 from 3, a Vec4 from 4
33 set_state(const char *name, const Mat4 &mat implementation)
35 int add_state_element(const char *name, int num_floats);
37 void set_state(const char *name, float value);
38 void set_state(const char *name, const Vec3 &vec);
39 void set_state(const char *name, const Vec4 &vec);
40 void set_state(const char *name, const Mat4 &mat);
42 const State *get_state(const char *name) const;
43 const State *get_state(int idx) const;
46 extern StateManager state_manager;
48 #endif // STATE_MANAGER_H_