]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/sampler.h
Rewrite state management
[libs/gl.git] / source / core / sampler.h
index bb02269f8c0ec9bcfd4408b3e48fa49702b90e06..ff9201860e69bc4c7cc6ed8af2dc512940ac5615 100644 (file)
@@ -114,7 +114,7 @@ public:
        Sampler();
 
 private:
-       void update_parameter(int) const;
+       void update() const;
        void set_parameter_i(unsigned, int) const;
        void set_parameter_f(unsigned, float) const;
        void set_parameter_fv(unsigned, const float *) const;
@@ -155,12 +155,9 @@ 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 set_debug_name(const std::string &);
 };