Jump to content

Should pixi.js webGL work in electron?


karhu
 Share

Recommended Posts

I've been building little browser game, but for the sake of learning new stuff I've tried to make my game run in desktop using Electron. The game loads up well, doesn't show any errors but the whole canvas is white, BUT if I use variable forceCanvas = true, it works!

So there has to be some kind of issue with the WebGL. Does the WebGL or pixi even work in electron or does my computer have some kind of weird issue with graphics? (Debian with AMD so it is possible... :D)

Link to comment
Share on other sites

I had to add this to get WebGL working on a laptop with an AMD chip.
// Chrome by default black lists certain GPUs because of bugs.
// if your are not able to view webgl try enabling --ignore-gpu-blacklist option
// But, this will make electron/chromium less stable.
app.commandLine.appendSwitch('--ignore-gpu-blacklist');
Found here:
https://github.com/hokein/electron-sample-apps/blob/b721a920e641f6937c8d8277660a15d00c42509f/webgl/main.js#L8
Link to comment
Share on other sites

1 minute ago, flyovergames said:

I had to add this to get WebGL working on a laptop with an AMD chip.

// Chrome by default black lists certain GPUs because of bugs.
// if your are not able to view webgl try enabling --ignore-gpu-blacklist option
// But, this will make electron/chromium less stable.
app.commandLine.appendSwitch('--ignore-gpu-blacklist');

Found here:
https://github.com/hokein/electron-sample-apps/blob/b721a920e641f6937c8d8277660a15d00c42509f/webgl/main.js#L8

Thanks! So the issue were my laptop! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...