X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fresources.cpp;h=dd9a3c68c3543b549f425a863a842ad2d35bcc04;hb=9087cc0a372b9c739f15398c7a22c0a6eb5041bb;hp=8aecb933cadc3ce2585799b31c9ce14bca5ae70a;hpb=3500f13f51dabadd2e7f06b81820936520cc8115;p=libs%2Fgl.git diff --git a/source/resources.cpp b/source/resources.cpp index 8aecb933..dd9a3c68 100644 --- a/source/resources.cpp +++ b/source/resources.cpp @@ -132,15 +132,16 @@ Texture2D *Resources::create_texture2d(const string &name) RefPtr tex = new Texture2D(resource_manager); + Sampler &samp = tex->get_default_sampler(); if(is_mipmapped(default_tex_filter)) { tex->set_auto_generate_mipmap(true); - tex->set_mag_filter(LINEAR); + samp.set_mag_filter(LINEAR); } else - tex->set_mag_filter(default_tex_filter); - tex->set_min_filter(default_tex_filter); - tex->set_max_anisotropy(default_tex_anisotropy); + samp.set_mag_filter(default_tex_filter); + samp.set_min_filter(default_tex_filter); + samp.set_max_anisotropy(default_tex_anisotropy); if(resource_manager) resource_manager->set_resource_location(*tex, *this, name);