+void Material::remove_texture(Texture *tex)
+{
+ std::vector<Texture*>::iterator it = std::find(textures.begin(), textures.end(), tex);
+ if(it != textures.end()) {
+ textures.erase(it);
+ }
+
+ for(int i=0; i<NUM_MTL_TEXTURES; i++) {
+ if(stdtex[i] == tex) {
+ stdtex[i] = 0;
+ }
+ }
+}
+