mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 11:43:53 +00:00
ifcviewer: move scene state into ViewportCore (#84-c)
Move the five scene-state fields that drive per-model GPU upload + the
streaming residency loop into ViewportCore:
BufferPool pool_ — vertex+index sub-allocator
StreamingThread streaming_thread_ — background chunk reader
std::unordered_map<uint32_t, ModelGpuData> models_gpu_
— per-model state
uint32_t next_model_id_ — model-id allocator
uint32_t next_object_id_ — globally-unique object-id allocator
ViewportCore.h gains transitive includes for BufferPool / StreamingThread
/ ModelGpuData; ViewportWindow keeps the same names as reference aliases
so existing method bodies that touch them don't have to change.
Same risk profile as #84-a and #84-b: the storage moved but the values
are still set and consumed by the same code paths, so behaviour stays
identical.
Builds: desktop / bonsai / web all green. Tests 100/100.
This commit is contained in:
@@ -633,7 +633,12 @@ ViewportWindow::ViewportWindow(QWindow* parent)
|
||||
edge_bgl_ (core_.edge_bgl_),
|
||||
edge_pipeline_layout_ (core_.edge_pipeline_layout_),
|
||||
edge_pipeline_ (core_.edge_pipeline_),
|
||||
pick_pipeline_(core_.pick_pipeline_) {
|
||||
pick_pipeline_(core_.pick_pipeline_),
|
||||
pool_ (core_.pool_),
|
||||
streaming_thread_(core_.streaming_thread_),
|
||||
models_gpu_ (core_.models_gpu_),
|
||||
next_model_id_ (core_.next_model_id_),
|
||||
next_object_id_ (core_.next_object_id_) {
|
||||
// wgpu doesn't need a GL context; we just need a real native window
|
||||
// whose backing layer matches the GPU API wgpu will drive.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user