Explorar o código

Merge pull request #5250 from sebavan/master

MacOS Safari 12
David Catuhe %!s(int64=7) %!d(string=hai) anos
pai
achega
45c53e8771
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/Engine/babylon.engine.ts

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

@@ -1011,6 +1011,11 @@
                         this._gl = <any>(canvas.getContext("webgl2", options) || canvas.getContext("experimental-webgl2", options));
                         this._gl = <any>(canvas.getContext("webgl2", options) || canvas.getContext("experimental-webgl2", options));
                         if (this._gl) {
                         if (this._gl) {
                             this._webGLVersion = 2.0;
                             this._webGLVersion = 2.0;
+
+                            // Prevent weird browsers to lie :-)
+                            if (!this._gl.deleteQuery) {
+                                this._webGLVersion = 1.0;
+                            }
                         }
                         }
                     } catch (e) {
                     } catch (e) {
                         // Do nothing
                         // Do nothing