]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.h
Support generating modern, GLSL 1.30+ shaders with ProgramBuilder
[libs/gl.git] / source / texture.h
index af0844c55e26938f00b2201e2f10abd576ece537..c091c884cacfd592833120b785c7f83ff2fe303e 100644 (file)
@@ -71,6 +71,7 @@ protected:
        public:
                Loader(Texture &);
        private:
+               void filter(TextureFilter);
                void generate_mipmap(bool);
                void mag_filter(TextureFilter);
                void max_anisotropy(float);
@@ -118,6 +119,11 @@ protected:
 public:
        void set_min_filter(TextureFilter);
        void set_mag_filter(TextureFilter);
+
+       /** Sets filter for both minification and magnification.  Since mipmapping
+       is not applicable to magnification, LINEAR is used instead. */
+       void set_filter(TextureFilter);
+
        void set_max_anisotropy(float);
 
        /** Sets the wrapping mode for all coordinates. */
@@ -143,11 +149,11 @@ public:
        GLenum get_target() const { return target; }
        unsigned get_id() const { return id; }
 
-       void bind() const;
+       void bind() const { bind_to(0); }
        void bind_to(unsigned) const;
 
-       static const Texture *current();
-       static void unbind();
+       static const Texture *current(unsigned = 0);
+       static void unbind() { unbind_from(0); }
        static void unbind_from(unsigned);
 };