X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fsampler.h;h=ff9201860e69bc4c7cc6ed8af2dc512940ac5615;hb=9b3bce7ae76ff8c0c81315d2505ea96bf422a318;hp=79aea8f8b76621f6ed9f5e5f44d0df08bf84aa0d;hpb=96bbfddc653826ee9848c468c53bca024711a6c3;p=libs%2Fgl.git diff --git a/source/core/sampler.h b/source/core/sampler.h index 79aea8f8..ff920186 100644 --- a/source/core/sampler.h +++ b/source/core/sampler.h @@ -99,7 +99,6 @@ private: }; unsigned id; - const Texture *owner; TextureFilter min_filter; TextureFilter mag_filter; float max_anisotropy; @@ -113,11 +112,9 @@ private: public: Sampler(); - Sampler(const Texture &); -private: - void init(); - void update_parameter(int) const; +private: + 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; @@ -158,14 +155,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 &); };