]> git.tdb.fi Git - libs/gl.git/blobdiff - source/resources.cpp
Support linear to sRGB conversion when loading materials and textures
[libs/gl.git] / source / resources.cpp
index 8e872d5defbc7a703aec6b9ee56d3218fd393289..10d76148860c0e43d3464429e534502b08a966f3 100644 (file)
@@ -19,7 +19,8 @@ namespace Msp {
 namespace GL {
 
 Resources::Resources():
-       default_tex_filter(LINEAR_MIPMAP_LINEAR)
+       default_tex_filter(LINEAR_MIPMAP_LINEAR),
+       srgb_conversion(false)
 {
        add_type<Animation>().suffix(".anim").keyword("animation");
        add_type<Armature>().suffix(".arma").keyword("armature");
@@ -40,6 +41,11 @@ void Resources::set_default_texture_filter(TextureFilter tf)
        default_tex_filter = tf;
 }
 
+void Resources::set_srgb_conversion(bool c)
+{
+       srgb_conversion = c;
+}
+
 Texture2D *Resources::create_texture2d(const string &name)
 {
        string ext = FS::extpart(name);