Skip to content

Commit

Permalink
Set PREFER_ENV default to WEBGL2 for all devices (pixijs#7974)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev7355608 committed May 19, 2022
1 parent f07f871 commit f0bc7fc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/core/src/settings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { settings } from '@pixi/settings';
import { ENV } from '@pixi/constants';
import { isMobile } from '@pixi/utils';

/**
* The maximum support for using WebGL. If a device does not
Expand All @@ -9,16 +8,13 @@ import { isMobile } from '@pixi/utils';
* explicitly remove feature support to target a more stable
* baseline, prefer a lower environment.
*
* Due to {@link https://bugs.chromium.org/p/chromium/issues/detail?id=934823|bug in chromium}
* we disable webgl2 by default for all non-apple mobile devices.
*
* @static
* @name PREFER_ENV
* @memberof PIXI.settings
* @type {number}
* @default PIXI.ENV.WEBGL2
*/
settings.PREFER_ENV = isMobile.any ? ENV.WEBGL : ENV.WEBGL2;
settings.PREFER_ENV = ENV.WEBGL2;

/**
* If set to `true`, *only* Textures and BaseTexture objects stored
Expand Down

0 comments on commit f0bc7fc

Please sign in to comment.