浏览代码

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe 5 年之前
父节点
当前提交
4e614f2c78
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 3 0
      gui/src/3D/controls/button3D.ts
  2. 2 0
      src/Engines/thinEngine.ts

+ 3 - 0
gui/src/3D/controls/button3D.ts

@@ -124,6 +124,9 @@ export class Button3D extends AbstractButton3D {
             this._facadeTexture.rootContainer.scaleY = this._contentScaleRatio;
             this._facadeTexture.premulAlpha = true;
         }
+        else {
+            this._facadeTexture.rootContainer.clearControls();
+        }
 
         this._facadeTexture.addControl(value);
 

+ 2 - 0
src/Engines/thinEngine.ts

@@ -2616,6 +2616,8 @@ export class ThinEngine {
             this._alphaState.reset();
 
             this._unpackFlipYCached = null;
+
+            this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);
         }
 
         this._resetVertexBufferBinding();