From 0793c2cb8c94f499944f3b5f9d0b2d79a7d47794 Mon Sep 17 00:00:00 2001 From: timoore Date: Wed, 15 Jul 2009 23:08:42 +0000 Subject: [PATCH] Blow away unused SGMaterialLib::add_item functions --- simgear/scene/material/matlib.cxx | 42 ------------------------------- simgear/scene/material/matlib.hxx | 6 ----- 2 files changed, 48 deletions(-) diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index 63683d91..b20ccb44 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -115,48 +115,6 @@ bool SGMaterialLib::load( const string &fg_root, const string& mpath, return true; } - -// Load a library of material properties -bool SGMaterialLib::add_item ( const string &tex_path ) -{ - string material_name = tex_path; - int pos = tex_path.rfind( "/" ); - material_name = material_name.substr( pos + 1 ); - - return add_item( material_name, tex_path ); -} - - -// Load a library of material properties -bool SGMaterialLib::add_item ( const string &mat_name, const string &full_path ) -{ - int pos = full_path.rfind( "/" ); - string tex_name = full_path.substr( pos + 1 ); - string tex_path = full_path.substr( 0, pos ); - - SG_LOG( SG_TERRAIN, SG_INFO, " Loading material " - << mat_name << " (" << full_path << ")"); - - matlib[mat_name] = new SGMaterial( full_path ); - matlib[mat_name]->add_name(mat_name); - - return true; -} - - -// Load a library of material properties -bool SGMaterialLib::add_item ( const string &mat_name, osg::StateSet *state ) -{ - matlib[mat_name] = new SGMaterial( state ); - matlib[mat_name]->add_name(mat_name); - - SG_LOG( SG_TERRAIN, SG_INFO, " Loading material given a premade " - << "osg::StateSet = " << mat_name ); - - return true; -} - - // find a material record by material name SGMaterial *SGMaterialLib::find( const string& material ) { SGMaterial *result = NULL; diff --git a/simgear/scene/material/matlib.hxx b/simgear/scene/material/matlib.hxx index 6a873d50..145225b9 100644 --- a/simgear/scene/material/matlib.hxx +++ b/simgear/scene/material/matlib.hxx @@ -68,12 +68,6 @@ public: // Load a library of material properties bool load( const string &fg_root, const string& mpath, SGPropertyNode *prop_root ); - - // Add the named texture with default properties - bool add_item( const string &tex_path ); - bool add_item( const string &mat_name, const string &tex_path ); - bool add_item( const string &mat_name, osg::StateSet *state ); - // find a material record by material name SGMaterial *find( const string& material ); -- 2.39.5