shprog.keep();
}
else
- shprog = material->create_compatible_shader();
+ throw invalid_operation("no collection");
if(shdata)
shdata = new ProgramData(*shdata, shprog.get());
return i->second;
}
-void RenderPass::set_material(const Material *mat)
+void RenderPass::set_material(const Material *mat, DataFile::Collection *coll)
{
material = mat;
material.keep();
- finalize_material(0);
+ finalize_material(coll);
}
void RenderPass::set_texture(unsigned index, const Texture *tex, const Sampler *samp)