}
void Renderer::set_texture(Tag tag, const Texture *tex, const Sampler *samp)
+{
+ set_texture(tag, tex, -1, samp);
+}
+
+void Renderer::set_texture(Tag tag, const Texture *tex, int level, const Sampler *samp)
{
State &state = get_state();
bound_tex.tag = tag;
bound_tex.texture = tex;
bound_tex.sampler = samp;
+ bound_tex.level = level;
state.texture_count = texture_stack.size();
}
if(t.binding<0 || shprog_changed)
t.binding = state.shprog->get_uniform_binding(t.tag);
if(t.binding>=0)
- pipeline_state.set_texture(t.binding, t.texture, t.sampler);
+ pipeline_state.set_texture(t.binding, t.texture, t.level, t.sampler);
}
pipeline_state.set_depth_test(state.depth_test);