X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fsampler.h;h=43d1e5412a2fe3df0bb732ac42bc6b1344e1b003;hb=6065f6622cc275dc0b20baaf7c267e71169d18f3;hp=bb02269f8c0ec9bcfd4408b3e48fa49702b90e06;hpb=dbc91b65728ab9c0e574bb1127cfe4d2da55de7f;p=libs%2Fgl.git diff --git a/source/core/sampler.h b/source/core/sampler.h index bb02269f..43d1e541 100644 --- a/source/core/sampler.h +++ b/source/core/sampler.h @@ -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 @@ -114,10 +112,7 @@ public: Sampler(); private: - 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; + void update() const; public: void set_min_filter(TextureFilter); @@ -155,12 +150,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 &); };