How to choose the most effective renderer, Canvas or WebGL

I am developing a game with PIXI.js for desktop devices. PIXI has both WebGL and Canvas renderers; we will use WebGL wherever it is supported by the device.

My problem is that some low-level devices technically support WebGL, although it does not work well due to the slow GPU. In some cases, Canvas rendering will work much better.

How can I decide at runtime which visualizer to use?

Perhaps the WebGL context contains some useful information.

+4
source share
1 answer

failIfMajorPerformanceCaveat . , , : https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2.1

Chrome ( 2013 , ), , "" .

, PixiJS, , WebGL. , , : https://github.com/pixijs/pixi.js/issues/1738

, PixiJS - .

, , .

, - WebGL Android 4.4, - Chrome. WebGL (, Sony xperia one).

- , . / . , PIXI: http://www.html5gamedevs.com/topic/1733-detect-performance-issues-to-display-a-message/

+3

Source: https://habr.com/ru/post/1605949/


All Articles