X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Frenderpass.cpp;h=fb092624b756c06ff463cdb34097b458cdd15158;hb=12342e01c014137b72546c1e3a54181063e69415;hp=561eab6a7045f9f5448701398737cf370b4c1af6;hpb=69e7127d18035fabcf2f5ab40fa8ce5b9acea003;p=libs%2Fgl.git diff --git a/source/materials/renderpass.cpp b/source/materials/renderpass.cpp index 561eab6a..fb092624 100644 --- a/source/materials/renderpass.cpp +++ b/source/materials/renderpass.cpp @@ -124,12 +124,12 @@ void RenderPass::set_material(const Material *mat) 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