]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texgen.h
Always bind textures in a specific texture unit
[libs/gl.git] / source / texgen.h
index bb076c629ddb2ea7ea50d8b1b1f1cb64e1b11391..c69df6386fceb0036eb99e8ebfa6ddf5280d6cce 100644 (file)
@@ -35,10 +35,13 @@ public:
        void set_mode(TexGenMode);
        void set_plane(const Vector4 &);
 
-       void bind_to(TexCoordComponent) const;
+       void bind_to(TexCoordComponent c) const { bind_to(0, c); }
+       void bind_to(unsigned, TexCoordComponent) const;
 
-       static const TexGen *current(TexCoordComponent);
-       static void unbind_from(TexCoordComponent);
+       static const TexGen *current(TexCoordComponent c) { return current(0, c); }
+       static const TexGen *current(unsigned, TexCoordComponent);
+       static void unbind_from(TexCoordComponent c) { unbind_from(0, c); }
+       static void unbind_from(unsigned, TexCoordComponent);
 private:
        static unsigned coord_index(TexCoordComponent);
 };