mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
ifcviewer: move buildModelBindGroup + captureNextFrameToPng setter into ViewportCore (#84-v)
Two small helpers + the screenshot-quit flag flip across; the render- side capture encode + readback + PNG save itself stays in VW (those need a stbi-style PNG writer to replace QImage::save before they can move, and that's its own commit). VW keeps tiny forwarders so bonsai's SceneLoader + the CLI screenshot path don't see the move. The streaming sync-fallback gate already reads the core-side pending_screenshot_path_, so capture timing is unchanged.
This commit is contained in:
@@ -323,6 +323,21 @@ public:
|
||||
void uploadInstanceChunk(const InstanceChunk& chunk);
|
||||
void finalizeModel(std::uint32_t model_id);
|
||||
|
||||
// ---- Cross-chunk + screenshot capture (#84-v) -------------------------
|
||||
//
|
||||
// Rebuild every chunk's bind group for the supplied model. No-op
|
||||
// when the model has no GPU storage yet (empty load — the chunk
|
||||
// draw loop skips it anyway).
|
||||
void buildModelBindGroup(ModelGpuData& m);
|
||||
|
||||
// Arm a one-shot screenshot capture. The next render() encodes a
|
||||
// surface-to-buffer copy alongside the main pass, maps it back to
|
||||
// RGBA8, and saves a PNG at `path`. `quit_after` requests host
|
||||
// shutdown once the capture writes — the host's quit() decides
|
||||
// when (synchronously or queued).
|
||||
void captureNextFrameToPng(const std::string& path, bool quit_after);
|
||||
bool pending_screenshot_quit_ = false;
|
||||
|
||||
// ---- Surface configuration (#84-u) ------------------------------------
|
||||
//
|
||||
// Configure the swapchain at the given physical size. Picks a present
|
||||
|
||||
Reference in New Issue
Block a user