Selaa lähdekoodia

prevent texture disposal while in clone()

ncannasse 7 vuotta sitten
vanhempi
commit
a021155495
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      h3d/mat/Texture.hx

+ 3 - 0
h3d/mat/Texture.hx

@@ -96,8 +96,11 @@ class Texture {
 	}
 
 	public function clone( ?allocPos : h3d.impl.AllocPos ) {
+		var old = lastFrame;
+		preventAutoDispose();
 		var t = new Texture(width, height, null, format, allocPos);
 		h3d.pass.Copy.run(this, t);
+		lastFrame = old;
 		return t;
 	}