|
| ~MaterialManager () |
| Frees all allocated data structures.
|
|
void | loadMaterial () |
|
Material * | getMaterialFor (video::ITexture *t, scene::IMeshBuffer *mb) |
|
Material * | getMaterialFor (video::ITexture *t, video::E_MATERIAL_TYPE material_type) |
|
Material * | getMaterialFor (video::ITexture *t) |
|
Material * | getMaterialSPM (std::string lay_one_tex_lc, std::string lay_two_tex_lc, const std::string &def_shader_name="solid") |
|
void | setAllMaterialFlags (video::ITexture *t, scene::IMeshBuffer *mb) |
| Searches for the material in the given texture, and calls a function in the material to set the irrlicht material flags.
|
|
void | setAllUntexturedMaterialFlags (scene::IMeshBuffer *mb) |
|
int | addEntity (Material *m) |
|
Material * | getMaterial (const std::string &t, bool is_full_path=false, bool make_permanent=false, bool complain_if_not_found=true, bool strip_path=true, bool install=true, bool create_if_not_found=true) |
| Returns the material of a given name, if it doesn't exist, it is loaded.
|
|
void | addSharedMaterial (const std::string &filename, bool deprecated=false) |
|
bool | pushTempMaterial (const std::string &filename, bool deprecated=false) |
|
bool | pushTempMaterial (const XMLNode *root, const std::string &filename, bool deprecated=false) |
|
void | popTempMaterial () |
|
void | makeMaterialsPermanent () |
| Makes all materials permanent.
|
|
bool | hasMaterial (const std::string &fname) |
|
void | unloadAllTextures () |
|
Material * | getDefaultSPMaterial (const std::string &shader_name, const std::string &layer_one_lc="", bool full_path=false) |
|
Material * | getLatestMaterial () |
|
|
void | parseMaterialFile (const std::string &filename) |
|
|
int | m_shared_material_index |
|
std::vector< Material * > | m_materials |
|
std::map< std::string, Material * > | m_default_sp_materials |
|
◆ getMaterial()
Material * MaterialManager::getMaterial |
( |
const std::string & |
fname, |
|
|
bool |
is_full_path = false , |
|
|
bool |
make_permanent = false , |
|
|
bool |
complain_if_not_found = true , |
|
|
bool |
strip_path = true , |
|
|
bool |
install = true , |
|
|
bool |
create_if_not_found = true |
|
) |
| |
Returns the material of a given name, if it doesn't exist, it is loaded.
Materials that are just loaded are not permanent, and so get deleted after a race (this is used to load temporary, track specific materials). To make material permanent, make_permanent must be set to true. This is used for the powerup_manager, since not all icons for the powerups are listed in the materials.dat file, causing the missing ones to be temporary only (and then get deleted after one race, causing the powerup_manager to have invalid pointers.
- Parameters
-
fname | Name of the material. |
is_full_path | True if the name includes the path (defaults to false) |
make_permanent | True if this material should be kept in memory (defaults to false) |
◆ makeMaterialsPermanent()
void MaterialManager::makeMaterialsPermanent |
( |
| ) |
|
Makes all materials permanent.
Used for overworld.
◆ setAllMaterialFlags()
void MaterialManager::setAllMaterialFlags |
( |
video::ITexture * |
t, |
|
|
scene::IMeshBuffer * |
mb |
|
) |
| |
Searches for the material in the given texture, and calls a function in the material to set the irrlicht material flags.
- Parameters
-
t | Pointer to the texture. |
mb | Pointer to the mesh buffer. |
The documentation for this class was generated from the following files: