]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderpass.cpp
Support linear to sRGB conversion when loading materials and textures
[libs/gl.git] / source / renderpass.cpp
index 158e9fc8390206aea6025f7fae37ab844048068c..448db60a91f967cca6362a2ad9e5c41ff5afdc68 100644 (file)
@@ -102,7 +102,10 @@ void RenderPass::Loader::init()
 void RenderPass::Loader::material_inline()
 {
        RefPtr<Material> mat = new Material;
-       load_sub(*mat);
+       if(coll)
+               load_sub(*mat, get_collection());
+       else
+               load_sub(*mat);
        obj.material = mat;
 }
 
@@ -173,7 +176,10 @@ void RenderPass::TextureLoader::texture(const string &name)
 void RenderPass::TextureLoader::texture2d()
 {
        tex = new Texture2D;
-       load_sub(static_cast<Texture2D &>(*tex));
+       if(coll)
+               load_sub(static_cast<Texture2D &>(*tex), get_collection());
+       else
+               load_sub(static_cast<Texture2D &>(*tex));
 }
 
 } // namespace GL