void RenderPass::set_material(const Material *mat)
{
material = mat;
+ material.keep();
}
void RenderPass::set_texture(unsigned index, const Texture *tex)
return;
}
- throw KeyError("No texture slot for that unit", lexical_cast(index));
+ textures.push_back(TextureSlot(index));
+ textures.back().texture = tex;
+ textures.back().texture.keep();
}
void RenderPass::bind() const