]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texenv.h
Always bind textures in a specific texture unit
[libs/gl.git] / source / texenv.h
index 55704e580ecb4719712ffccef86ec2b5f69b495d..1327bb850de64999e297f504b82489811164104c 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007-2008  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GL_TEXENV_H_
 #define MSP_GL_TEXENV_H_
 
@@ -36,10 +29,12 @@ public:
        void set_color(const Color &);
        TexEnvMode get_mode() const { return mode; }
        const Color &get_color() const { return color; }
-       void bind() const;
+       void bind() const { bind_to(0); }
+       void bind_to(unsigned) const;
 
-       static const TexEnv *current();
-       static void unbind();
+       static const TexEnv *current(unsigned = 0);
+       static void unbind() { unbind_from(0); }
+       static void unbind_from(unsigned);
 };
 
 } // namespace GL