};
unsigned id;
- const Texture *owner;
TextureFilter min_filter;
TextureFilter mag_filter;
float max_anisotropy;
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;
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 &);
};