1 thought on “Webgl in linux no available?

  1. @yagamiram
    In my case setting app.commandLine.appendSwitch('ignore-gpu-blacklist', 'true') directly after require('electron') in main.js helped, but there are various other settings you could test:

    app.commandLine.appendSwitch('enable-gpu-rasterization', 'true')
    app.commandLine.appendSwitch('enable-zero-copy', 'true')
    app.commandLine.appendSwitch('disable-software-rasterizer', 'true')
    app.commandLine.appendSwitch('enable-native-gpu-memory-buffers', 'true')

    Nice overview of Chromium command line switches: http://peter.sh/experiments/chromium-command-line-switches/

    And of course, as mentioned above, adding the experimental features to the options object you give as arguments to create the browser window.

    options = {
    	webgl: true,
    	experimentalFeatures: true,
    	experimentalCanvasFeatures: true,
    	offscreen: true,
    const mainWindow = new electron.BrowserWindow(options)

    You can also point Electron to load chrome://gpu/ to see what’s enabled and what not.

Comments are closed.