shprog.keep();
}
else
- shprog = material->create_compatible_shader();
+ throw invalid_operation("no collection");
if(shdata)
shdata = new ProgramData(*shdata, shprog.get());
finalize_material(0);
}
-void RenderPass::set_texture(unsigned index, const Texture *tex)
+void RenderPass::set_texture(unsigned index, const Texture *tex, const Sampler *samp)
{
if(!texturing)
texturing = new Texturing;
- texturing->attach(index, *tex, texturing->get_attached_sampler(index));
+ texturing->attach(index, *tex, (samp ? samp : texturing->get_attached_sampler(index)));
}
int RenderPass::get_texture_index(const string &n) const