+ default_sampler.set_wrap_t(w);
+}
+
+void Texture::set_wrap_r(TextureWrap w)
+{
+ default_sampler.set_wrap_r(w);
+}
+
+bool Texture::can_generate_mipmap()
+{
+ return EXT_framebuffer_object;
+}
+
+void Texture::generate_mipmap()
+{
+ // glGenerateMipmap is defined here
+ static Require _req(EXT_framebuffer_object);
+
+ if(ARB_direct_state_access)
+ glGenerateTextureMipmap(id);
+ else
+ {
+ BindRestore _bind(this);
+ glGenerateMipmap(target);
+ }
+}
+
+void Texture::set_auto_generate_mipmap(bool gm)
+{
+ if(gm)
+ static Require _req(EXT_framebuffer_object);
+
+ auto_gen_mipmap = gm;
+}
+
+void Texture::set_compare_enabled(bool c)
+{
+ if(c)
+ default_sampler.set_compare(default_sampler.get_compare_function());
+ else
+ default_sampler.disable_compare();
+}
+
+void Texture::set_compare_func(Predicate f)
+{
+ default_sampler.set_compare(f);
+}
+
+void Texture::load_image(const string &fn, bool srgb)
+{
+ load_image(fn, 0, srgb);
+}
+
+void Texture::load_image(const string &fn, unsigned lv, bool srgb)
+{
+ Graphics::Image img;
+ img.load_file(fn);
+
+ image(img, lv, srgb);
+}