X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftexunit.h;fp=source%2Ftexunit.h;h=5aec5b31127d032c3cf2da87ba5ba646e04d0643;hb=84bc56b96c21c831104a22e0cbd0f3b72ab5d8c3;hp=0000000000000000000000000000000000000000;hpb=7adcad3b40a03000a82e32db4523761c218309b8;p=libs%2Fgl.git diff --git a/source/texunit.h b/source/texunit.h new file mode 100644 index 00000000..5aec5b31 --- /dev/null +++ b/source/texunit.h @@ -0,0 +1,32 @@ +#ifndef MSP_GL_TEXUNIT_H_ +#define MSP_GL_TEXUNIT_H_ + +#include + +namespace Msp { +namespace GL { + +class Texture; + +class TexUnit +{ +public: + TexUnit(); + bool set_texture(const Texture *); + const Texture *get_texture() { return texture; } + //TexEnv &get_env() { return env; } + + static TexUnit &activate(unsigned); + static TexUnit ¤t(); +private: + const Texture *texture; + //TexEnv env; + + static std::vector units; + static TexUnit *cur_unit; +}; + +} // namespace GL +} // namespace Msp + +#endif