LoginSignup
3
3

More than 5 years have passed since last update.

GPUが使えないLinux環境でChromeをうごかしてWebGLなページを表示する

Last updated at Posted at 2016-02-26

背景

VirtualBoxでLinuxを動かし、そこで、Chromeを動かすと、
3Dハードウェアアクセラレーションの設定をOffにしてもFirefoxと違い、
WebGLが使えない。

OSMesaを使えばできそうなことが分かりやってみた。

やり方

HDDが30GB程度あるLinux環境を用意する。

chrome本体をビルドと違い、ビルド自体はすぐ完了する。

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/path/to/depot_tools
mkdir chromium
fetch --nohooks --no-history chromium
cd src
./build/install-build-deps.sh
gclient runhooks
ninja -C out/Debug osmesa
sudo cp out/Debug/libosmesa.so /opt/google/chrome/
google-chrome --use-gl=osmesa

参考資料

関連記事

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3