+ if(!obj.texturing)
+ obj.texturing = new Texturing;
+ TextureLoader ldr(*obj.texturing, i, coll);
+ load_sub_with(ldr);
+}
+
+void RenderPass::Loader::texunit_auto(const string &n)
+{
+ if(!obj.texturing)
+ obj.texturing = new Texturing;
+ int i = obj.texturing->find_free_unit(n);
+ if(i<0)
+ throw runtime_error("no free texunit");
+ texunit_named(i, n);
+}
+
+void RenderPass::Loader::texunit_named(unsigned i, const string &n)
+{
+ texunit(i);
+ obj.tex_names[n] = i;
+ obj.ensure_private_shader_data();
+ obj.shdata->uniform(n, static_cast<int>(i));