We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d604622 commit f0511deCopy full SHA for f0511de
CCBoot.js
@@ -1859,10 +1859,17 @@ var _initSys = function () {
1859
var tmpCanvas = document.createElement("CANVAS");
1860
try{
1861
var context = cc.create3DContext(tmpCanvas, {'stencil': true});
1862
- if(context) {
+ if (context && context.getShaderPrecisionFormat) {
1863
_supportWebGL = true;
1864
}
1865
1866
+ if (_supportWebGL && sys.os === sys.OS_IOS) {
1867
+ // Not activating WebGL in iOS UIWebView because it may crash when entering background
1868
+ if (!window.indexedDB) {
1869
+ _supportWebGL = false;
1870
+ }
1871
1872
+
1873
if (_supportWebGL && sys.os === sys.OS_ANDROID) {
1874
var browserVer = parseFloat(sys.browserVersion);
1875
switch (sys.browserType) {
0 commit comments