소스 검색

Merge pull request #463 from Temechon/patch-30

Update babylon.engine.ts
David Catuhe 10 년 전
부모
커밋
291e38e01f
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      Babylon/babylon.engine.ts

+ 6 - 5
Babylon/babylon.engine.ts

@@ -310,6 +310,12 @@
         gl.bindTexture(gl.TEXTURE_2D, texture);
         gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, invertY === undefined ? 1 : (invertY ? 1 : 0));
 
+        texture._baseWidth = width;
+        texture._baseHeight = height;
+        texture._width = potWidth;
+        texture._height = potHeight;
+        texture.isReady = true;
+        
         processFunction(potWidth, potHeight);
 
         var filters = getSamplingParameters(samplingMode, !noMipmap, gl);
@@ -324,11 +330,6 @@
         gl.bindTexture(gl.TEXTURE_2D, null);
 
         engine._activeTexturesCache = [];
-        texture._baseWidth = width;
-        texture._baseHeight = height;
-        texture._width = potWidth;
-        texture._height = potHeight;
-        texture.isReady = true;
         texture.samplingMode = samplingMode;
         scene._removePendingData(texture);
     };