Skip to content

feat: choose the graphics card, or drawing without it, for the 3D view - #493

Merged
ManuelStaggl merged 1 commit into
mainfrom
feat/gpu-preference-484
Nov 16, 2026
Merged

ManuelStaggl merged 1 commit into
mainfrom
feat/gpu-preference-484

Conversation

@ManuelStaggl

@ManuelStaggl ManuelStaggl commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fourth step of #484. Settings › General › 3D view:

  • Graphics card: Automatic, Fast, Frugal. Chromium cannot pick the adapter for WebGL on Windows (powerPreference does not switch it), so the installed app writes Windows' own per-program preference: HKCU\Software\Microsoft\DirectX\UserGpuPreferences, value = the program path, GpuPreference=2; (Fast) or 1; (Frugal). This is the entry Settings › System › Display › Graphics writes. It needs no administrator rights, and Automatic deletes it. It is written again at each start in case an update moved the program. A development build (electron.exe) and test runs never write it. On macOS it sets Chromium's force_high_performance_gpu / force_low_power_gpu.
  • Draw without graphics card: app.disableHardwareAcceleration(), for drivers that leave the view black or crash it.

Both apply at the next start. The settings show a restart button while the stored values differ from those PartBuddy started with. The "Graphics" row from #491 shows which card actually draws, apart from the one asked for.

Checked on real hardware (Intel UHD 770 + NVIDIA Quadro RTX 4000): with the entry set to GpuPreference=1; for the Electron binary, WebGL moved from the Quadro (without the entry) to the Intel card.

Tests: unit tests for the reg.exe arguments and the macOS switch; one new E2E test (choice, restart hint, kept after reopening).

Type of change

  • Feature
  • Fix
  • Documentation or ADR
  • Build, CI or tooling

Checklist

  • Commits follow Conventional Commits and are small and focused.
  • Lint, typecheck, unit tests and the affected E2E tests pass locally.
  • No personal data, absolute local paths, secrets or generated output in the diff.
  • No new dependencies (reg.exe ships with Windows).
  • UI changes use design tokens only and are localised (DE/EN). No screenshots attached.
  • No ADR needed.

🤖 Generated with Claude Code

Settings › General › 3D view: Graphics card (Automatic, Fast, Frugal)
and Draw without graphics card. On Windows the installed app writes
Windows' own per-program preference (HKCU UserGpuPreferences, the
entry Settings › Display › Graphics writes; Automatic removes it),
since Chromium cannot pick the adapter for WebGL there; on macOS it
asks Chromium. Drawing without graphics card turns hardware
acceleration off. Both apply after a restart, which the settings offer.

Part of #484.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ManuelStaggl
ManuelStaggl merged commit eb4df49 into main Nov 16, 2026
10 checks passed
@ManuelStaggl
ManuelStaggl deleted the feat/gpu-preference-484 branch November 16, 2026 15:23
ManuelStaggl added a commit that referenced this pull request Nov 16, 2026
…d its result (#494)

## Summary

Last step of #484.

- `docs/feature-catalog.md`: new row **F16 3D view and graphics**. It
lists what #487, #491, #492 and #493 did and what was left out (custom
profile, picking one adapter by name, vendor-specific paths, WebGPU).
- `docs/glossar.md`: **3D-Ansicht (3D view)**; not "Viewport" or
"Viewer".
- `tools/webgpu-probe`: a small Electron probe that draws one heavy
scene (1,056,000 triangles, edges, room light, contact shadow; 1440 ×
900 at 1.5) with three's WebGLRenderer and WebGPURenderer on the real
graphics card, in a hidden window. Median GPU time per frame:

| Graphics card | WebGL | WebGPU |
| --- | --- | --- |
| NVIDIA Quadro RTX 4000 | 1.3 ms | 4.0 ms |
| Intel UHD Graphics 770 | 9.8 ms | 13.3 ms |

WebGPU was slower on both cards, so the view stays on WebGL (product
owner, 2026-11-16).

## Type of change

- [ ] Feature
- [ ] Fix
- [x] Documentation or ADR
- [x] Build, CI or tooling

## Checklist

- [x] Commits follow Conventional Commits and are small and focused.
- [x] The probe was run locally on both cards.
- [x] No personal data, absolute local paths, secrets or generated
output in the diff (`probe.json`/`probe.log` are ignored).
- [x] No new dependencies.
- [x] No UI change.
- [x] No ADR needed: ADR 0002 already says WebGL first; the probe backs
it with numbers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: ManuelStaggl <17688572+ManuelStaggl@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ManuelStaggl pushed a commit that referenced this pull request Nov 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.3.6](v0.3.5...v0.3.6)
(2026-11-16)


### Features

* choose one particular graphics card for the 3D view on Windows
([#495](#495))
([10c67cb](10c67cb))
* choose the graphics card, or drawing without it, for the 3D view
([#493](#493))
([eb4df49](eb4df49))
* the settings say what the 3D view draws with, with frame counters over
the view ([#491](#491))
([43b32ac](43b32ac))
* three display quality profiles for the 3D view
([#492](#492))
([d4b7166](d4b7166))


### Bug Fixes

* the open sketch sheet follows a theme switch
([#490](#490))
([f6ff3bd](f6ff3bd))


### Performance

* the 3D view draws only while something changes or moves
([#487](#487))
([34f8328](34f8328))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant