]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.h
Make explicit mipmap generation public
[libs/gl.git] / source / texture.h
index 94614c45c7319748c102456dcd6c1b3bb6119649..19da006937cf536aef73bc9ae43e0ba3bc3472b1 100644 (file)
@@ -128,7 +128,7 @@ protected:
        TextureWrap wrap_s;
        TextureWrap wrap_t;
        TextureWrap wrap_r;
-       bool gen_mipmap;
+       Msp::UInt8 auto_gen_mipmap;
        bool compare;
        Predicate cmp_func;
        mutable int dirty_params;
@@ -170,14 +170,15 @@ public:
 
        static bool can_generate_mipmap();
 
+       void generate_mipmap();
+
        /** Sets automatic mipmap generation.  If enabled, mipmaps are generated
        when a texture image is uploaded. */
-       void set_generate_mipmap(bool);
+       void set_auto_generate_mipmap(bool);
 
-protected:
-       void auto_generate_mipmap();
+       /// Deprecated.  Use set_auto_generate_mipmap instead.
+       void set_generate_mipmap(bool g) { set_auto_generate_mipmap(g); }
 
-public:
        /** Sets depth texture comparison.  Has no effect on other formats.  When
        comparison is enabled, the third component of the texture coordinate is
        compared against the texel value, and the result is returned as the texture