karhu Posted November 3, 2017 Share Posted November 3, 2017 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) Quote Link to comment Share on other sites More sharing options...
flyovergames Posted November 3, 2017 Share Posted November 3, 2017 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 karhu 1 Quote Link to comment Share on other sites More sharing options...
karhu Posted November 3, 2017 Author Share Posted November 3, 2017 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! Quote Link to comment Share on other sites More sharing options...
mattstyles Posted November 3, 2017 Share Posted November 3, 2017 I literally had no idea there was this switch, I'm guessing pixi will use webgl for you in chrome right? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.