X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftexunit.h;h=7cf43a7832b4dc6bb3949685f4f90f09a80c1bbb;hb=HEAD;hp=6253d8d914f52c85f7f9eec6a4beae0fcd733722;hpb=6cbcaf877f0be27b4d921d1c182f5e21d4662268;p=libs%2Fgl.git diff --git a/source/texunit.h b/source/texunit.h deleted file mode 100644 index 6253d8d9..00000000 --- a/source/texunit.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef MSP_GL_TEXUNIT_H_ -#define MSP_GL_TEXUNIT_H_ - -#include - -namespace Msp { -namespace GL { - -class Sampler; -class Texture; - -/** -Keeps track of texture unit related state. Intended for internal use. -*/ -class TexUnit -{ -private: - unsigned index; - const Texture *texture; - const Sampler *sampler; - - static std::vector units; - static TexUnit *cur_unit; - - TexUnit(); - -public: - unsigned get_index() const { return index; } - bool set_texture(const Texture *); - const Texture *get_texture() const { return texture; } - bool set_sampler(const Sampler *); - const Sampler *get_sampler() const { return sampler; } - void bind(); - - static unsigned get_n_units(); - static TexUnit &get_unit(unsigned); - static TexUnit ¤t(); - static TexUnit *find_unit(const Texture *); -}; - -} // namespace GL -} // namespace Msp - -#endif