+RenderPass::TextureLoader::TextureLoader(Texturing &t, unsigned i, Collection *c):
+ DataFile::CollectionObjectLoader<Texturing>(t, c),
+ index(i)
+{
+ add("texture", &TextureLoader::texture);
+ add("texture2d", &TextureLoader::texture2d);
+}
+
+void RenderPass::TextureLoader::finish()
+{
+ if(tex)
+ {
+ if(env)
+ obj.attach(index, *tex, *env);
+ else
+ obj.attach(index, *tex);
+ tex.release();
+ env.release();
+ }
+}