phaserjs / phaser-ce

Phaser CE is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
http://phaser.io
MIT License
1.34k stars 492 forks source link

Fix from 2.13.3 for 'excessive webgl calls' was removed in 2.15.0 to … #692

Closed drfrankius closed 3 years ago

drfrankius commented 3 years ago

…fix multi-texture batching. This allows the fix from 2.13.3 to be enabled when multiTexture: false is set

is a bug fix (closes #681)

Phaser CE 13.3.3 had a fix for 'Fixed webGL making excessive calls, which was negatively impacting the frame-rate of low-end machines and mobile devices (#356, #641).'. This fix boosted WEB-GL performance, but broke batching so was reverted in 2.15.0. This PR reenables that fix, but only when multiTexture: false is set in the game config. So multitexture batching should still work, and no excessive calls to bind / flush() should be made in the WebGLSpriteBatch when it is disabled.