Properly update materials when adding surface, fixes #23790

This commit is contained in:
Juan Linietsky 2019-02-22 16:26:19 -03:00
parent 6761625155
commit 16e67388a2
2 changed files with 2 additions and 2 deletions

View File

@ -2235,7 +2235,7 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
}
mesh->surfaces.push_back(surface);
mesh->instance_change_notify(true, false);
mesh->instance_change_notify(true, true);
info.vertex_mem += surface->total_data_size;
}

View File

@ -3620,7 +3620,7 @@ void RasterizerStorageGLES3::mesh_add_surface(RID p_mesh, uint32_t p_format, VS:
}
mesh->surfaces.push_back(surface);
mesh->instance_change_notify(true, false);
mesh->instance_change_notify(true, true);
info.vertex_mem += surface->total_data_size;
}