1. 程式人生 > >CEF 開啟webGl功能

CEF 開啟webGl功能

webGL  的3D繪畫功能非常強大,但有些CEF 是關閉此功能的

以下是開啟方法:

1)首先不要禁用GPU

		//不要禁用GPU
		//command_line->AppendSwitch("disable-gpu");
		//command_line->AppendSwitch("disable-gpu-compositing");

2)開啟WEBGL 功能,忽略顯示卡黑名單

		command_line->AppendSwitchWithValue("enable-webgl", "1");  //開啟WEBGL
		command_line->AppendSwitchWithValue("ignore-gpu-blacklist", "1");  //忽略顯示卡黑名單
		command_line->AppendSwitchWithValue("allow-file-access-from-files", "1");  //本地除錯WEBGL