20 #ifndef HEADER_MATERIAL_MANAGER_HPP 21 #define HEADER_MATERIAL_MANAGER_HPP 23 #include "utils/no_copy.hpp" 27 namespace video {
class ITexture; }
28 namespace scene {
class IMeshBuffer;
class ISceneNode; }
48 void parseMaterialFile(
const std::string& filename);
49 int m_shared_material_index;
51 std::vector<Material*> m_materials;
53 std::map<std::string, Material*> m_default_sp_materials;
59 Material* getMaterialFor(video::ITexture* t,
60 scene::IMeshBuffer *mb);
61 Material* getMaterialFor(video::ITexture* t,
62 video::E_MATERIAL_TYPE material_type);
63 Material* getMaterialFor(video::ITexture* t);
64 Material* getMaterialSPM(std::string lay_one_tex_lc,
65 std::string lay_two_tex_lc,
66 const std::string& def_shader_name =
"solid");
67 void setAllMaterialFlags(video::ITexture* t,
68 scene::IMeshBuffer *mb);
69 void setAllUntexturedMaterialFlags(scene::IMeshBuffer *mb);
72 Material *getMaterial (
const std::string& t,
73 bool is_full_path=
false,
74 bool make_permanent=
false,
75 bool complain_if_not_found=
true,
76 bool strip_path=
true,
bool install=
true,
bool create_if_not_found=
true);
77 void addSharedMaterial(
const std::string& filename,
bool deprecated =
false);
78 bool pushTempMaterial (
const std::string& filename,
bool deprecated =
false);
79 bool pushTempMaterial (
const XMLNode *root,
const std::string& filename,
bool deprecated =
false);
80 void popTempMaterial ();
81 void makeMaterialsPermanent();
82 bool hasMaterial(
const std::string& fname);
84 void unloadAllTextures();
86 Material* getDefaultSPMaterial(
const std::string& shader_name,
87 const std::string& layer_one_lc =
"",
88 bool full_path =
false);
89 Material* getLatestMaterial() {
return m_materials[m_materials.size()-1]; }
Definition: three_d_animation.hpp:32
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:25
Definition: material.hpp:47
utility class used to parse XML files
Definition: xml_node.hpp:47
Definition: material_manager.hpp:44