소스 검색

added onContextLost

ncannasse 9 년 전
부모
커밋
db6d022cf8
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      h3d/scene/World.hx

+ 6 - 1
h3d/scene/World.hx

@@ -206,7 +206,7 @@ class World extends Object {
 			var res = resolveSpecularTexture(texturePath);
 			if( specularInAlpha ) {
 				if( res != null ) {
-					t.t.setAlpha(res, t);
+					t.setAlpha(res);
 					specTex = t;
 				}
 			} else {
@@ -440,6 +440,11 @@ class World extends Object {
 		textures = new Map();
 	}
 
+	public function onContextLost() {
+		for( c in allChunks )
+			cleanChunk(c);
+	}
+
 	function getStride( model : WorldModel ) {
 		return model.stride;
 	}