+void RenderPass::TextureLoader::finish()
+{
+ if(tex)
+ {
+ if(env)
+ obj.attach(index, *tex, *env);
+ else
+ obj.attach(index, *tex);
+ tex.release();
+ env.release();
+ }
+}
+
+void RenderPass::TextureLoader::texenv()
+{
+ throw runtime_error("TexEnvs can't be loaded yet");
+ /*env = new TexEnv;
+ load_sub(*env);*/
+}
+
+void RenderPass::TextureLoader::texture(const string &name)
+{
+ tex = &get_collection().get<Texture>(name);
+ tex.keep();
+}