add linux electron flags to be more permissive with graphics cards
This commit is contained in:
parent
3e517d88dc
commit
9e142fbe1e
1 changed files with 17 additions and 0 deletions
17
app-el.js
17
app-el.js
|
|
@ -14,6 +14,23 @@ const devel = process.argv.slice(2).map(v => v.replaceAll('-', '')).indexOf('dev
|
||||||
|
|
||||||
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true;
|
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true;
|
||||||
|
|
||||||
|
// Enable GPU/graphics acceleration for Linux (addresses WebGL issues)
|
||||||
|
// Equivalent to Chrome flags that fixed the rendering in Chrome browser
|
||||||
|
if (process.platform === 'linux') {
|
||||||
|
// CRITICAL: Override GPU blocklist - allows hardware acceleration on blocked GPUs
|
||||||
|
app.commandLine.appendSwitch('ignore-gpu-blocklist');
|
||||||
|
|
||||||
|
// Enable WebGL draft extensions (improves WebGL compatibility)
|
||||||
|
app.commandLine.appendSwitch('enable-webgl-draft-extensions');
|
||||||
|
|
||||||
|
// Force GPU acceleration for 2D/3D rendering
|
||||||
|
app.commandLine.appendSwitch('enable-gpu-rasterization');
|
||||||
|
|
||||||
|
// Optional: Try Vulkan if available (Chromium auto-falls back to OpenGL if not)
|
||||||
|
// Uncomment if you need Vulkan specifically, but most systems work without it:
|
||||||
|
app.commandLine.appendSwitch('enable-features', 'Vulkan');
|
||||||
|
}
|
||||||
|
|
||||||
server({
|
server({
|
||||||
port: 5309,
|
port: 5309,
|
||||||
apps: basDir,
|
apps: basDir,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue