Browse Source

Noise: missing setCurrent()

trethaller 6 years ago
parent
commit
aaf0d4dd19
1 changed files with 5 additions and 1 deletions
  1. 5 1
      hide/prefab/Noise.hx

+ 5 - 1
hide/prefab/Noise.hx

@@ -121,7 +121,11 @@ class Noise extends Prefab {
 		tex = new h3d.mat.Texture(size, size, [Target]);
 		if( !tex.flags.has(IsNPOT) ) tex.wrap = Repeat;
 		updateTexture(tex);
-		tex.realloc = function() haxe.Timer.delay(function() updateTexture(tex), 0);
+		var e = h3d.Engine.getCurrent();
+		tex.realloc = function() haxe.Timer.delay(function() {
+			e.setCurrent();
+			updateTexture(tex);
+		}, 0);
 		return tex;
 	}