If the pass did not already have a shader, it will try to create one from
the material and fail if it has no collection.
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)
const Program *get_shader_program() const { return shprog.get(); }
const ProgramData *get_shader_data() const { return shdata.get(); }
const std::string &get_slotted_uniform_name(const std::string &) const;
- void set_material(const Material *);
+ void set_material(const Material *, DataFile::Collection * = 0);
const Material *get_material() const { return material.get(); }
const std::string &get_material_slot_name() const { return material_slot; }
void set_texture(unsigned, const Texture *, const Sampler * = 0);