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;
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(RefPtr<IO::Seekable> io = open_from_sources(name))
{
ProgramCompiler compiler;
- compiler.compile(*io, this);
+ compiler.compile(*io, this, name);
RefPtr<Program> program = new Program;
compiler.add_shaders(*program);
program->link();