mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
0b8875669e
Background colour gains a meaningful alpha. Below 1 the viewport composites over whatever the host has stacked behind it rather than painting a colour of its own; at 0 it clears to nothing, so the model draws over another 3D view, a map, or ordinary page content. There is no depth interaction -- the layer behind is strictly behind and cannot occlude the model. Honouring the alpha needs a premultiplied surface. configureSurface asks for one only when the platform advertises it, the same way it picks a present mode, and falls back to Auto otherwise -- this machine's Vulkan surface offers opaque compositing only, so hardcoding premultiplied would have requested a mode it does not support. The clear follows that choice: scaled by alpha when premultiplied, held at 1 when not, since scaling would otherwise just darken the colour for an alpha nobody reads. ViewportWindow::setBackgroundColor now forwards to core rather than writing through a reference proxy, dropping one more member from the friend declaration it is meant to shrink. The screenshot QImage is tagged premultiplied to match what the main pass leaves in the buffer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>