Przeglądaj źródła

Prevent dispose for terrain

ShiroSmith 6 lat temu
rodzic
commit
e4736814c2
1 zmienionych plików z 6 dodań i 0 usunięć
  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 {