Преглед на файлове

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 {