Просмотр исходного кода

add update and watch on BigTexture.set()

bstouls 9 лет назад
Родитель
Сommit
beeca438f1
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      h3d/mat/BigTexture.hx

+ 2 - 0
h3d/mat/BigTexture.hx

@@ -137,6 +137,8 @@ class BigTexture {
 		var tsize = t.getSize();
 		var tsize = t.getSize();
 		upload(t, Math.round(et.du * size), Math.round(et.dv * size), tsize.width, tsize.height);
 		upload(t, Math.round(et.du * size), Math.round(et.dv * size), tsize.width, tsize.height);
 		// todo : update q.texture & setup watch
 		// todo : update q.texture & setup watch
+		et.q.texture = t;
+		t.watch(rebuild);
 	}
 	}
 
 
 	function rebuild() {
 	function rebuild() {