火狐开启和关闭webGL方法
HTML5中有一项非常强大的3D画面显示技术——webGL。被称为Flash的替代者,SilverLight有力竞争者。WebGL是一项在网页浏览器体现3D画面的技术,有别于过往需加装浏览器插件,通过WebGL的技术,只需要编写网页代码即可实现3D图像的展示。WebGL的规格尚在发展中,由非营利的Khronos Group管理。
推荐一些WebGL的3D小游戏:
经典鱼缸测试:这是一个经典的网页速度测试,电脑网速越快,鱼游的速度就越快,另外有多个场景可以切换,鱼的数量也可以设置。但是webGL目前存在一些问题,比如安全性问题(不知道现在解决了没有)。大多数安全专家建议,用户应该在浏览器中关闭WebGL,直到WebGL标准作出相应修正解决这一安全问题。
Cycleblob:该游戏场景类似基于贪吃蛇游戏,可以通过上下左右键移动,并有多个关卡。
3D水母:该游戏有点单调,展示的是水底3D水母,并可以用鼠标来调整视角。
那么我们能不能随时打开和关闭webGL,只在使用时开启呢?以下为开启方法,关闭反之。
在地址栏输入about:configWebGL is amazing. Take a look at X-Wing or First-Person Tetris in Firefox. What do you mean it’s not working?
找到webgl.disabled 设为false
找到webgl.force-enabled 设为true
My laptop’s two years old but, despite having a reasonable dedicated graphics card, WebGL is disabled in Firefox. Mozilla blacklist specific GPUs based on the driver version number, i.e.
- NVIDIA cards require a driver numbered 8.17.12.5721 or greater
- AMD/ATI cards are 8.741.0.0 or greater
- Intel cards normally require 6.14.11 on XP, 7.15.10 on Vista or 8.15.10 on 7 (although some products are completely blocked)
- Macs require OS version 10.6 or newer
Unfortunately, hardware vendors stop producing drivers for legacy products (anything released before last Tuesday). In some cases, your PC vendor will insist on releasing their own modified driver updates and there’s no guarantee they’ll do that. Your graphics card may be WebGL-compatible, but it’ll be blocked in Firefox if the driver version is 0.0.0.1 behind the approved list. Type “about:support” in the address bar and scroll down to the “Graphics” section at the bottom to discover whether your card is suitable.
Big Red Warning
We’re about to bypass Firefox’s GPU blacklist. It’s a dumb thing to do and involves tinkering with dangerous configuration settings. Do this at your own risk: I can’t accept responsibility for any catastrophic PC failures, migraines, plagues, explosions or spontaneous human combustion caused by these changes … But it’s worth the risk to play X-Wing!Here Be Dragons
Type about:config in Firefox’s address bar and make the following changes:- To enable WebGL, set webgl.force-enabled to true.
- To enable Layers Acceleration, set layers.acceleration.force-enabled to true
- To enable Direct2D in Windows Vista/7, set gfx.direct2d.force-enabled to true