Quellcode durchsuchen

Add preventAutoDispose for Env

ShiroSmith vor 5 Jahren
Ursprung
Commit
b9618b0e5a
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      h3d/scene/pbr/Environment.hx

+ 3 - 0
h3d/scene/pbr/Environment.hx

@@ -246,15 +246,18 @@ class Environment  {
 		if( lut == null ) {
 			lut = new h3d.mat.Texture(128, 128, [Target], RGBA32F);
 			lut.setName("irradLut");
+			lut.preventAutoDispose();
 		}
 		if( diffuse == null ) {
 			diffuse = new h3d.mat.Texture(diffSize, diffSize, [Cube, Target], RGBA32F);
 			diffuse.setName("irradDiffuse");
+			diffuse.preventAutoDispose();
 		}
 		if( specular == null ) {
 			specular = new h3d.mat.Texture(specSize, specSize, [Cube, Target, MipMapped, ManualMipMapGen], RGBA32F);
 			specular.setName("irradSpecular");
 			specular.mipMap = Linear;
+			specular.preventAutoDispose();
 		}
 	}