- const RenderPass *old = current();
- if(!set_current(this))
- return;
-
- if(shprog)
- {
- shprog->bind();
- shdata->apply();
- }
- else if(old && old->shprog)
- GL::Program::unbind();
-
- if(material)
- material->bind();
- else if(old && old->material)
- GL::Material::unbind();
-
- unsigned used_tex_units = 0;
- for(vector<TextureSlot>::const_iterator i=textures.begin(); i!=textures.end(); ++i)
- {
- i->texture->bind_to(i->index);
- used_tex_units |= 1<<i->index;
- }
- if(old)
+ map<string, string>::const_iterator i = uniform_slots.find(slot);
+ if(i==uniform_slots.end())