Browse Source

Properly update materials when adding surface, fixes #23790

Juan Linietsky 6 years ago
parent
commit
16e67388a2

+ 1 - 1
drivers/gles2/rasterizer_storage_gles2.cpp

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

+ 1 - 1
drivers/gles3/rasterizer_storage_gles3.cpp

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