소스 검색

add update and watch on BigTexture.set()

bstouls 9 년 전
부모
커밋
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();
 		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() {