Преглед изворни кода

WebGL2 is turned of on Chrome/M63

David Catuhe пре 7 година
родитељ
комит
ce7cbe0a10

Разлика између датотеке није приказан због своје велике величине
+ 7546 - 7544
Playground/babylon.d.txt


Разлика између датотеке није приказан због своје велике величине
+ 8674 - 8672
dist/preview release/babylon.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 43 - 43
dist/preview release/babylon.js


+ 15 - 0
dist/preview release/babylon.max.js

@@ -8098,6 +8098,19 @@ var BABYLON;
                 this._deterministicLockstep = options.deterministicLockstep;
                 this._lockstepMaxSteps = options.lockstepMaxSteps;
                 this._doNotHandleContextLost = options.doNotHandleContextLost ? true : false;
+                // Exceptions
+                if (!options.disableWebGL2Support) {
+                    if (navigator && navigator.userAgent) {
+                        var ua = navigator.userAgent;
+                        for (var _i = 0, _a = Engine.WebGL2ExceptionList; _i < _a.length; _i++) {
+                            var exception = _a[_i];
+                            if (ua.indexOf(exception) > -1) {
+                                options.disableWebGL2Support = true;
+                                break;
+                            }
+                        }
+                    }
+                }
                 // GL
                 if (!options.disableWebGL2Support) {
                     try {
@@ -12290,6 +12303,8 @@ var BABYLON;
                 return false;
             }
         };
+        /** Use this array to turn off WebGL2 on known buggy browsers version */
+        Engine.WebGL2ExceptionList = ["Chrome/63"];
         Engine.Instances = new Array();
         // Const statics
         Engine._ALPHA_DISABLE = 0;

Разлика између датотеке није приказан због своје велике величине
+ 43 - 43
dist/preview release/babylon.worker.js


Разлика између датотеке није приказан због своје велике величине
+ 43 - 43
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 15 - 0
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -8098,6 +8098,19 @@ var BABYLON;
                 this._deterministicLockstep = options.deterministicLockstep;
                 this._lockstepMaxSteps = options.lockstepMaxSteps;
                 this._doNotHandleContextLost = options.doNotHandleContextLost ? true : false;
+                // Exceptions
+                if (!options.disableWebGL2Support) {
+                    if (navigator && navigator.userAgent) {
+                        var ua = navigator.userAgent;
+                        for (var _i = 0, _a = Engine.WebGL2ExceptionList; _i < _a.length; _i++) {
+                            var exception = _a[_i];
+                            if (ua.indexOf(exception) > -1) {
+                                options.disableWebGL2Support = true;
+                                break;
+                            }
+                        }
+                    }
+                }
                 // GL
                 if (!options.disableWebGL2Support) {
                     try {
@@ -12290,6 +12303,8 @@ var BABYLON;
                 return false;
             }
         };
+        /** Use this array to turn off WebGL2 on known buggy browsers version */
+        Engine.WebGL2ExceptionList = ["Chrome/63"];
         Engine.Instances = new Array();
         // Const statics
         Engine._ALPHA_DISABLE = 0;

Разлика између датотеке није приказан због своје велике величине
+ 39 - 39
dist/preview release/viewer/babylon.viewer.js


+ 17 - 0
src/Engine/babylon.engine.ts

@@ -310,6 +310,9 @@
      * The engine class is responsible for interfacing with all lower-level APIs such as WebGL and Audio.
      */
     export class Engine {
+        /** Use this array to turn off WebGL2 on known buggy browsers version */
+        public static WebGL2ExceptionList = ["Chrome/63"];
+
         public static Instances = new Array<Engine>();
 
         public static get LastCreatedEngine(): Nullable<Engine> {
@@ -876,6 +879,20 @@
                 this._lockstepMaxSteps = options.lockstepMaxSteps;
                 this._doNotHandleContextLost = options.doNotHandleContextLost ? true : false;
 
+                // Exceptions
+                if (!options.disableWebGL2Support) {
+                    if (navigator && navigator.userAgent) {
+                        let ua = navigator.userAgent;
+
+                        for (var exception of Engine.WebGL2ExceptionList) {
+                            if (ua.indexOf(exception) > -1) {
+                                options.disableWebGL2Support = true;
+                                break;
+                            }
+                        }
+                    }
+                }
+
                 // GL
                 if (!options.disableWebGL2Support) {
                     try {

BIN
tests/validation/ReferenceImages/SpaceDeK.png