浏览代码

MacOS Safari 12

sebastien 7 年之前
父节点
当前提交
fc14ac2ea6
共有 1 个文件被更改,包括 5 次插入0 次删除
  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));
                         if (this._gl) {
                             this._webGLVersion = 2.0;
+
+                            // Prevent weird browsers to lie :-)
+                            if (!this._gl.deleteQuery) {
+                                this._webGLVersion = 1.0;
+                            }
                         }
                     } catch (e) {
                         // Do nothing