- attach_texture_to(diffuse.texture, texturing, tex_shdata, "diffuse_map");
- attach_texture_to(specular.texture, texturing, tex_shdata, "specular_map");
- attach_texture_to(normal.texture, texturing, tex_shdata, "normal_map");
- attach_texture_to(emission.texture, texturing, tex_shdata, "emission_map");
- attach_texture_to(shininess.texture, texturing, tex_shdata, "shininess_map");
- attach_texture_to(reflectivity.texture, texturing, tex_shdata, "reflectivity_map");
+ if(tag==texture_tags[0])
+ return diffuse.texture;
+ else if(tag==texture_tags[1])
+ return specular.texture;
+ else if(tag==texture_tags[2])
+ return shininess.texture;
+ else if(tag==texture_tags[3])
+ return normal.texture;
+ else if(tag==texture_tags[4])
+ return emission.texture;
+ else if(tag==texture_tags[5])
+ return reflectivity.texture;
+ else
+ return 0;