模拟器获取WEBGL上下文返回null

发布于 6 年前作者 yanxiao1540 次浏览最后编辑 6 年前来自 ask

就一行代码

canvas.getContext(‘webgl’)   //null

canvas.getContext(‘2d’) //正常

2 回复
cdu
cdu1 楼6 年前

用canvas.getContext(‘experimental-webgl’)来实现!

mhu
mhu2 楼4 年前

我跟你正好相反,2d get 为null