소스 검색

Fixing engine.clear bug

David Catuhe 11 년 전
부모
커밋
805d7acff2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Babylon/babylon.engine.js

+ 2 - 2
Babylon/babylon.engine.js

@@ -189,7 +189,7 @@ var BABYLON = BABYLON || {};
     };
 
     BABYLON.Engine.prototype.clear = function (color, backBuffer, depthStencil) {
-        this._gl.clearColor(color.r, color.g, color.b, color.a || 1.0);
+        this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);
         this._gl.clearDepth(1.0);
         var mode = 0;
 
@@ -928,7 +928,7 @@ var BABYLON = BABYLON || {};
     };
 
     BABYLON.Engine.prototype.setTextureFromPostProcess = function (channel, postProcess) {
-        this._bindTexture(channel, postProcess._textures.data[postProcess._currentRenderTextureInd]);
+        this._bindTexture(channel, postProcess._texture);
     };
 
     BABYLON.Engine.prototype.setTexture = function (channel, texture) {