16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 04:19:19 +02:00
This commit is contained in:
milek7
2019-01-11 23:15:03 +01:00
parent ead2123d8e
commit 3db9efd3f7
18 changed files with 135 additions and 40 deletions

View File

@@ -378,8 +378,9 @@ 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_materialmappings.emplace( material.name, materialhandle );
m_materials.emplace_back( std::move(material) );
m_materialmappings.emplace( material.name, materialhandle );
std::cout << m_materials.size() << std::endl;
}
else {
// otherwise record our failure to process the resource, to speed up subsequent attempts