浏览代码

Properly update materials when adding surface, fixes #23790

Juan Linietsky 6 年之前
父节点
当前提交
16e67388a2
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      drivers/gles2/rasterizer_storage_gles2.cpp
  2. 1 1
      drivers/gles3/rasterizer_storage_gles3.cpp

+ 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->instance_change_notify(true, false);
+	mesh->instance_change_notify(true, true);
 
 	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->instance_change_notify(true, false);
+	mesh->instance_change_notify(true, true);
 
 	info.vertex_mem += surface->total_data_size;
 }