浏览代码

Prevent dispose for terrain

ShiroSmith 6 年之前
父节点
当前提交
e4736814c2
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      h3d/scene/pbr/terrain/Surface.hx

+ 6 - 0
h3d/scene/pbr/terrain/Surface.hx

@@ -48,8 +48,14 @@ class SurfaceArray {
 		normal = new h3d.mat.TextureArray(res, res, count, [Target], RGBA);
 		pbr = new h3d.mat.TextureArray(res, res, count, [Target], RGBA);
 		albedo.wrap = Repeat;
+		albedo.realloc = null;
+		albedo.preventAutoDispose();
 		normal.wrap = Repeat;
+		normal.realloc = null;
+		normal.preventAutoDispose();
 		pbr.wrap = Repeat;
+		pbr.realloc = null;
+		pbr.preventAutoDispose();
 	}
 
 	public function clone() : SurfaceArray {