1 #ifndef MSP_GL_TEXUNIT_H_
2 #define MSP_GL_TEXUNIT_H_
14 Keeps track of texture unit related state. Mostly for internal use.
20 const Texture *texture;
22 const TexGen *texgen[4];
24 static std::vector<TexUnit> units;
25 static TexUnit *cur_unit;
30 unsigned get_index() const { return index; }
31 bool set_texture(const Texture *);
32 const Texture *get_texture() const { return texture; }
33 bool set_texenv(const TexEnv *);
34 const TexEnv *get_texenv() const { return texenv; }
35 bool set_texgen(unsigned, const TexGen *);
36 const TexGen *get_texgen(unsigned);
39 static unsigned get_n_units();
40 static TexUnit &get_unit(unsigned);
41 static TexUnit ¤t();
42 static TexUnit *find_unit(const Texture *);
43 static TexUnit *find_unit(const TexEnv *);