diff --git a/data/fonts/materials.xml b/data/fonts/materials.xml index b33a66186..8c34897e6 100644 --- a/data/fonts/materials.xml +++ b/data/fonts/materials.xml @@ -1,22 +1,22 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/src/graphics/material.cpp b/src/graphics/material.cpp index e0de3cd7c..dbd1a4a11 100644 --- a/src/graphics/material.cpp +++ b/src/graphics/material.cpp @@ -73,7 +73,7 @@ Material::Material(const XMLNode *node, bool deprecated) m_full_path = file_manager->getFileSystem()->getAbsolutePath(relativePath.c_str()).c_str(); init(); - node->get("lazy-load", &m_lazy_load); + node->get("dont-load", &m_dont_load_texture); bool b = false; node->get("clampu", &b); if (b) m_clamp_tex |= UCLAMP; //blender 2.4 style @@ -420,7 +420,7 @@ Material::Material(const std::string& fname, bool is_full_path, */ void Material::init() { - m_lazy_load = false; + m_dont_load_texture = false; m_texture = NULL; m_clamp_tex = 0; m_shader_type = SHADERTYPE_SOLID; @@ -465,8 +465,8 @@ void Material::init() //----------------------------------------------------------------------------- void Material::install(bool is_full_path, bool complain_if_not_found) { - // Don't load a texture that is lazily loaded. - if(m_lazy_load) return; + // Don't load a texture that are not supposed to be loaded automatically + if(m_dont_load_texture) return; const std::string &full_path = is_full_path ? m_texname @@ -477,6 +477,7 @@ void Material::install(bool is_full_path, bool complain_if_not_found) Log::error("material", "Cannot find texture '%s'.", m_texname.c_str()); m_texture = NULL; } + else { m_texture = irr_driver->getTexture(full_path, diff --git a/src/graphics/material.hpp b/src/graphics/material.hpp index 2fa7cb2ac..cea48fd6a 100644 --- a/src/graphics/material.hpp +++ b/src/graphics/material.hpp @@ -91,7 +91,7 @@ private: * at load time, it must be loaded elsewhere. This is used to store * material settings for font textures, without loading fonts for * languages that might not be needed at all. */ - bool m_lazy_load; + bool m_dont_load_texture; /** Name of a special sfx to play when a kart is on this terrain, or * "" if no special sfx exists. */ @@ -267,10 +267,10 @@ public: /** Returns the ITexture associated with this material. */ video::ITexture *getTexture() const { - // Note that atm lazy load means that the textures are not loaded - // via the material. So getTexture should only get called for non - // lazily loaded textures (used atm for font textures. - assert(!m_lazy_load); + // Note that dont load means that the textures are not loaded + // via the material. So getTexture should only get called for + // automatically loaded textures (used atm for font textures). + assert(!m_dont_load_texture); return m_texture; } // getTexture // ------------------------------------------------------------------------