+ else
+ shprog = material->create_compatible_shader();
+
+ if(shdata)
+ shdata = new ProgramData(*shdata, shprog.get());
+
+ shprog_from_material = true;
+}
+
+void RenderPass::ensure_private_shader_data()
+{
+ if(!shprog)
+ throw invalid_operation("RenderPass::ensure_private_shader_data");
+
+ if(!shdata)
+ shdata = new ProgramData(shprog.get());
+ else if(shdata.refcount()>1)
+ shdata = new ProgramData(*shdata);
+}