mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
ifcviewer: move configureSurface into ViewportCore (#84-u)
The swapchain configuration path — WGPU_PRESENT_MODE handling, mode-preference order (Mailbox / Immediate / FifoRelaxed / Fifo), caps probe, cfg.alphaMode wiring, and the on-resize depth + MSAA + HiZ texture reallocation + bind-group invalidation — all move to ViewportCore. The only VW-side concern was a QString::fromLatin1 in the advertised-modes log, which becomes a std::string concat with the same output. ViewportWindow's render() / resizeEvent / surface-outdated retry paths call core_.configureSurface() now. createSurface() (which returns the platform-specific WGPUSurface from the host) stays VW because Qt platform discovery has to happen on the Qt side.
This commit is contained in:
@@ -323,6 +323,16 @@ public:
|
||||
void uploadInstanceChunk(const InstanceChunk& chunk);
|
||||
void finalizeModel(std::uint32_t model_id);
|
||||
|
||||
// ---- Surface configuration (#84-u) ------------------------------------
|
||||
//
|
||||
// Configure the swapchain at the given physical size. Picks a present
|
||||
// mode from caps + preference order (Mailbox → Immediate → FifoRelaxed
|
||||
// → Fifo, overridable via WGPU_PRESENT_MODE), reconfigures the
|
||||
// surface, then (re)allocates the depth + MSAA color + HiZ resolve
|
||||
// textures and invalidates the HiZ + edge bind groups so they
|
||||
// rebuild against the new depth view on next encode.
|
||||
void configureSurface(int width_px, int height_px);
|
||||
|
||||
// ---- HiZ + framebuffer attachments (#84-r) ----------------------------
|
||||
//
|
||||
// Build the HiZ resolve pipeline (and shader module + BGL + uniform
|
||||
|
||||
Reference in New Issue
Block a user