From a2c8cfb84ddcf99a5e2ebb240e78621fd11ee273 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 14 May 2003 18:27:25 +0000 Subject: [PATCH] Removed global instance of the material manager. Each application will need to create it's own instance itself. --- simgear/scene/material/matlib.cxx | 10 ++++------ simgear/scene/material/matlib.hxx | 4 ---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index a865ab7e..d3e49c82 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -55,15 +55,12 @@ SG_USING_NAMESPACE(std); SG_USING_STD(string); -// global material management class -SGMaterialLib material_lib; - - // Constructor SGMaterialLib::SGMaterialLib ( void ) { } +#if 0 // debugging infrastructure static int gen_test_light_map() { static const int env_tex_res = 32; int half_res = env_tex_res / 2; @@ -99,6 +96,7 @@ static int gen_test_light_map() { return tex_name; } +#endif // generate standard colored directional light environment texture map @@ -553,7 +551,7 @@ bool SGMaterialLib::add_item ( const string &mat_name, const string &full_path ) SG_LOG( SG_TERRAIN, SG_INFO, " Loading material " << mat_name << " (" << full_path << ")"); - material_lib.matlib[mat_name] = new SGMaterial( full_path ); + matlib[mat_name] = new SGMaterial( full_path ); return true; } @@ -567,7 +565,7 @@ bool SGMaterialLib::add_item ( const string &mat_name, ssgSimpleState *state ) SG_LOG( SG_TERRAIN, SG_INFO, " Loading material given a premade " << "ssgSimpleState = " << mat_name ); - material_lib.matlib[mat_name] = m; + matlib[mat_name] = m; return true; } diff --git a/simgear/scene/material/matlib.hxx b/simgear/scene/material/matlib.hxx index 1a6e459a..30f2c2b2 100644 --- a/simgear/scene/material/matlib.hxx +++ b/simgear/scene/material/matlib.hxx @@ -90,8 +90,4 @@ public: }; -// global material management class -extern SGMaterialLib material_lib; - - #endif // _MATLIB_HXX -- 2.39.5