1 #ifndef MSP_GL_TEXUNIT_H_
2 #define MSP_GL_TEXUNIT_H_
14 Keeps track of texture unit related state. Mostly for internal use.
21 const Texture *texture;
23 static std::vector<TexUnit> units;
24 static TexUnit *cur_unit;
29 unsigned get_index() const { return index; }
30 bool supports_legacy() const { return legacy; }
31 bool set_texture(const Texture *);
32 const Texture *get_texture() const { return texture; }
35 static unsigned get_n_units();
36 static unsigned get_n_legacy_units();
37 static TexUnit &get_unit(unsigned);
38 static TexUnit ¤t();
39 static TexUnit *find_unit(const Texture *);