1 #ifndef MSP_GL_TEXUNIT_H_
2 #define MSP_GL_TEXUNIT_H_
13 Keeps track of texture unit related state. Intended for internal use.
19 const Texture *texture;
20 const Sampler *sampler;
22 static std::vector<TexUnit> units;
23 static TexUnit *cur_unit;
28 unsigned get_index() const { return index; }
29 bool set_texture(const Texture *);
30 const Texture *get_texture() const { return texture; }
31 bool set_sampler(const Sampler *);
32 const Sampler *get_sampler() const { return sampler; }
35 static unsigned get_n_units();
36 static TexUnit &get_unit(unsigned);
37 static TexUnit ¤t();
38 static TexUnit *find_unit(const Texture *);