]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/renderpass.cpp
Add sampler parameter to RenderPass::set_texture
[libs/gl.git] / source / materials / renderpass.cpp
index 561eab6a7045f9f5448701398737cf370b4c1af6..fb092624b756c06ff463cdb34097b458cdd15158 100644 (file)
@@ -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