]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/sampler.h
Remove remaining deprecated things from the core classes
[libs/gl.git] / source / core / sampler.h
index 79aea8f8b76621f6ed9f5e5f44d0df08bf84aa0d..43d1e5412a2fe3df0bb732ac42bc6b1344e1b003 100644 (file)
@@ -46,8 +46,6 @@ enum TextureWrap
        MIRRORED_REPEAT = GL_MIRRORED_REPEAT
 };
 
-class Texture;
-
 
 /**
 Samplers are used to access texture data in shaders.  To use a sampler with a
@@ -99,7 +97,6 @@ private:
        };
 
        unsigned id;
-       const Texture *owner;
        TextureFilter min_filter;
        TextureFilter mag_filter;
        float max_anisotropy;
@@ -113,14 +110,9 @@ private:
 
 public:
        Sampler();
-       Sampler(const Texture &);
-private:
-       void init();
 
-       void update_parameter(int) const;
-       void set_parameter_i(unsigned, int) const;
-       void set_parameter_f(unsigned, float) const;
-       void set_parameter_fv(unsigned, const float *) const;
+private:
+       void update() const;
 
 public:
        void set_min_filter(TextureFilter);
@@ -158,14 +150,11 @@ public:
        bool is_compare_enabled() const { return compare; }
        Predicate get_compare_function() const { return cmp_func; }
 
-       void bind() const { bind_to(0); }
-       void bind_to(unsigned) const;
+       void refresh() const { if(dirty_params) update(); }
 
-       static const Sampler *current(unsigned = 0);
-       static void unbind() { unbind_from(0); }
-       static void unbind_from(unsigned);
+       unsigned get_id() const { return id; }
 
-       void unload();
+       void set_debug_name(const std::string &);
 };