Reputation: 49
I am developing a game with WebGL. When I compile the app with PhoneGap (Apache cordova), the game runs at 10 FPS.
Instead in mobile browsers like firefox or google chrome, I have 60 fps.
Why??
Is there a way to deploy an app made with WebGL that is as fast as a normal desktop?
Upvotes: 4
Views: 1741
Reputation: 16597
WebGL is not enabled in the current WebView. If you are using ThreeJS then you are likely falling back to a software renderer which in most cases will be performing slower.
Upvotes: 9
Reputation: 119847
It depends on the engine behind the WebView, and it's usually the same as the built-in browser which almost never updated, and could be months behind the latest build. It means it's not optimized for much recent developments, like WebGL for instance.
Mobile browsers, on the other hand, such as Firefox or Chrome are regularly updated (6-week release cycle) and optimized so they do get an edge in dealing with recent tech.
WebView for Android 4.4 onwards are Chrome-based, so they should perform faster.
Upvotes: 5