+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)
+ {
+ obj.attach(index, *tex);
+ tex.release();
+ }
+}
+
+void RenderPass::TextureLoader::texture(const string &name)
+{
+ tex = &get_collection().get<Texture>(name);
+ tex.keep();
+}