问题
I'm attempting to build a mobile app with Three.js on Cordova,
This runs fine on the PC in the browser, but on the device it doesn't seem to be able to create the WebGL context on a Samsung Note 3
This is the error:
THREE.WebGLRenderer 77
THREE.WebGLRenderer: Error creating WebGL context. three.min.js:633
THREE.WebGLRenderer three.min.js:633
Uncaught TypeError: Cannot call method 'getExtension' of null
I'm using CrossWalk but it doesn't seem to make any difference
回答1:
Yes I'm running 4.4.2 which doesn't support WebGL it seems. I found out you need use CrossWalk and enable blacklisted GPUS.
<preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect --ignore-gpu-blacklist" />
来源:https://stackoverflow.com/questions/37716438/webgl-on-cordova-with-three-js