Resources::Resources():
default_tex_filter(Texture::can_generate_mipmap() ? LINEAR_MIPMAP_LINEAR : LINEAR),
+ default_tex_anisotropy(1.0f),
srgb_conversion(false),
resource_manager(0)
{
default_tex_filter = tf;
}
+void Resources::set_default_texture_anisotropy(float a)
+{
+ default_tex_anisotropy = a;
+}
+
void Resources::set_srgb_conversion(bool c)
{
srgb_conversion = c;
if(!resource_manager)
return 0;
- if(RefPtr<IO::Seekable> io = open_from_sources(name))
+ if(RefPtr<IO::Seekable> io = open_raw(name))
{
RefPtr<Mesh> mesh = new Mesh(resource_manager);
resource_manager->set_resource_location(*mesh, *this, name);
if(ext==".tex2d")
return 0;
- if(RefPtr<IO::Seekable> io = open_from_sources(name))
+ if(RefPtr<IO::Seekable> io = open_raw(name))
{
Graphics::Image image;
if(!resource_manager)
if(is_mipmapped(default_tex_filter))
{
- tex->set_generate_mipmap(true);
+ tex->set_auto_generate_mipmap(true);
tex->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);
if(resource_manager)
resource_manager->set_resource_location(*tex, *this, name);
if(ext==".shader")
return 0;
- if(RefPtr<IO::Seekable> io = open_from_sources(name))
+ if(RefPtr<IO::Seekable> io = open_raw(name))
{
ProgramCompiler compiler;
compiler.compile(*io, this, name);