- {
- string::size_type dot=n.rfind('.');
- tex.name=n.substr(0, dot);
- tex.texture = coll.get<Texture>(n);
- }
- for(string::iterator i=tex.name.begin(); i!=tex.name.end(); ++i)
- if(!isalnum(*i))
- *i='_';
- tech.textures.push_back(tex);
-}
-
-void Technique::Loader::texture(const string &n)
-{
- if(tech.main_texture)
- throw Exception("Only one main texture may be specified");
-
- tech.main_texture=coll.get<Texture>(n);
- TextureSlot tex;
- tex.name="texture";
- tex.texture=tech.main_texture;
- tech.textures.push_back(tex);