]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.h
Remove support for legacy OpenGL features
[libs/gl.git] / source / texture.h
index 94614c45c7319748c102456dcd6c1b3bb6119649..bd000a325e520b7392a2afc404988879f7e3ecca 100644 (file)
@@ -102,7 +102,6 @@ protected:
                WRAP_S = 4,
                WRAP_T = 8,
                WRAP_R = 16,
-               GENERATE_MIPMAP = 32,
                COMPARE = 64,
                COMPARE_FUNC = 128,
                MAX_ANISOTROPY = 256,
@@ -128,7 +127,7 @@ protected:
        TextureWrap wrap_s;
        TextureWrap wrap_t;
        TextureWrap wrap_r;
-       bool gen_mipmap;
+       bool auto_gen_mipmap;
        bool compare;
        Predicate cmp_func;
        mutable int dirty_params;
@@ -170,14 +169,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
@@ -201,16 +201,13 @@ public:
        GLenum get_target() const { return target; }
        unsigned get_id() const { return id; }
 
-       void bind(bool legacy = true) const { bind_to(0, legacy); }
-       void bind_to(unsigned, bool = true) const;
+       void bind() const { bind_to(0); }
+       void bind_to(unsigned) const;
 
        static const Texture *current(unsigned = 0);
        static void unbind() { unbind_from(0); }
        static void unbind_from(unsigned);
-private:
-       static bool is_legacy_target(GLenum);
 
-public:
        virtual UInt64 get_data_size() const { return 0; }
 };