]> git.tdb.fi Git - libs/gl.git/blobdiff - source/resources.h
Support linear to sRGB conversion when loading materials and textures
[libs/gl.git] / source / resources.h
index 8871c16e0b2648767bc3586727982d8c0bcfa296..0390d85936902d4b7e75b4c2d569ec8548e61353 100644 (file)
@@ -13,12 +13,19 @@ class Resources: virtual public DataFile::Collection
 {
 private:
        TextureFilter default_tex_filter;
+       bool srgb_conversion;
 
 public:
        Resources();
 
        void set_default_texture_filter(TextureFilter);
 
+       /** Enables or disables sRGB conversion.  If enabled, textures and material
+       colors are converted from sRGB to linear color space when loaded. */
+       void set_srgb_conversion(bool);
+
+       bool get_srgb_conversion() const { return srgb_conversion; }
+
 protected:
        Texture2D *create_texture2d(const std::string &);
 };