RefPtr<Texture2D> 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);