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;
24 static std::vector<TexUnit> units;
25 static TexUnit *cur_unit;
30 unsigned get_index() const { return index; }
31 bool supports_legacy() const { return legacy; }
32 bool set_texture(const Texture *, bool = true);
33 const Texture *get_texture() const { return texture; }
34 bool get_texture_legacy() const { return tex_legacy; }
37 static unsigned get_n_units();
38 static unsigned get_n_legacy_units();
39 static TexUnit &get_unit(unsigned);
40 static TexUnit ¤t();
41 static TexUnit *find_unit(const Texture *);