Browse Source

add update and watch on BigTexture.set()

bstouls 9 năm trước cách đây
mục cha
commit
beeca438f1
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      h3d/mat/BigTexture.hx

+ 2 - 0
h3d/mat/BigTexture.hx

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