16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 04:19:19 +02:00

fix material cache

This commit is contained in:
milek7
2019-01-11 23:15:41 +01:00
parent 61a83bf37c
commit e73f77b26f

View File

@@ -378,8 +378,8 @@ material_manager::create( std::string const &Filename, bool const Loadnow ) {
// if we have material name and shader it means resource was processed succesfully
material.finalize(Loadnow);
materialhandle = m_materials.size();
m_materials.emplace_back( std::move(material) );
m_materialmappings.emplace( material.name, materialhandle );
m_materials.emplace_back( std::move(material) );
}
else {
// otherwise record our failure to process the resource, to speed up subsequent attempts