WebGL on Cordova with Three.js

隐身守侯 提交于 2020-01-04 04:11:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!