Skip to content

feat: the settings say what the 3D view draws with, with frame counters over the view - #491

Merged
ManuelStaggl merged 1 commit into
mainfrom
feat/viewport-diagnostics-484
Nov 16, 2026
Merged

ManuelStaggl merged 1 commit into
mainfrom
feat/viewport-diagnostics-484

Conversation

@ManuelStaggl

Copy link
Copy Markdown
Collaborator

Summary

Second step of #484. Settings › General gets a new group, 3D view:

  • Graphics: the backend (WebGL 2), the graphics card the driver reports (the ANGLE wrapper removed, full name on hover) and who draws: the graphics card (hardware) or the CPU (software, e.g. SwiftShader when the driver is blocked).
  • Show frame rate in the 3D view: frames per second, frame time, draw calls and triangles in the bottom right corner of the view. Off by default, kept in settings.json (viewportStats), reset with the General section. Since perf: the 3D view draws only while something changes or moves #487 the view reads 0 at rest.

The adapter is read from a separate, short-lived WebGL context, so the settings also show it on the start page.

Tests: unit tests for the adapter name and software detection; one new E2E test (software is named, the overlay counts while orbiting and drops to 0 at rest); the settings E2E tests pass.

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 (1198) and the affected E2E tests pass locally.
  • No personal data, absolute local paths, secrets or generated output in the diff.
  • No new dependencies.
  • UI changes use design tokens only and are localised (DE/EN). No screenshots attached.
  • No ADR needed.

🤖 Generated with Claude Code

…rs over the view

Settings › General › 3D view names the backend, the graphics card and
whether the GPU or the CPU (software) draws. A new switch shows frames
per second, frame time, draw calls and triangles in the corner of the
view; it is off by default and kept in the settings.

Part of #484.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ManuelStaggl
ManuelStaggl merged commit 43b32ac into main Nov 16, 2026
10 checks passed
@ManuelStaggl
ManuelStaggl deleted the feat/viewport-diagnostics-484 branch November 16, 2026 14:45
ManuelStaggl added a commit that referenced this pull request Nov 16, 2026
#493)

## 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

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

## Checklist

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

🤖 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 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