@@ -123,12 +123,14 @@ void ImGuiSystem::NewFrame() {
123123
124124 ImGui::NewFrame ();
125125
126- // Loading overlay: show only a fullscreen progress bar while model/textures are loading
126+ // Loading overlay: show only a fullscreen progress bar while the model
127+ // itself is loading. Once the scene is ready and geometry is visible,
128+ // we no longer block the view with a full-screen progress bar.
127129 if (renderer) {
128130 const uint32_t scheduled = renderer->GetTextureTasksScheduled ();
129131 const uint32_t completed = renderer->GetTextureTasksCompleted ();
130132 const bool modelLoading = renderer->IsLoading ();
131- if (modelLoading || (scheduled > 0 && completed < scheduled) ) {
133+ if (modelLoading) {
132134 ImGuiIO& io = ImGui::GetIO ();
133135 // Suppress right-click while loading
134136 if (io.MouseDown [1 ]) io.MouseDown [1 ] = false ;
@@ -158,11 +160,7 @@ void ImGuiSystem::NewFrame() {
158160 ImGui::ProgressBar (frac, ImVec2 (barWidth, 0 .0f ));
159161 ImGui::Dummy (ImVec2 (0 .0f , 10 .0f ));
160162 ImGui::SetCursorPosX (barX);
161- if (modelLoading) {
162- ImGui::Text (" Loading model..." );
163- } else {
164- ImGui::Text (" Loading textures: %u / %u" , completed, scheduled);
165- }
163+ ImGui::Text (" Loading scene..." );
166164 ImGui::EndGroup ();
167165 ImGui::PopStyleVar ();
168166 }
@@ -172,6 +170,41 @@ void ImGuiSystem::NewFrame() {
172170 }
173171 }
174172
173+ // --- Streaming status: small progress indicator in the upper-right ---
174+ // Once the scene is visible, textures may continue streaming to the GPU.
175+ // Show a compact progress bar in the top-right while there are still
176+ // outstanding texture tasks, and hide it once everything is fully loaded.
177+ if (renderer) {
178+ const uint32_t uploadTotal = renderer->GetUploadJobsTotal ();
179+ const uint32_t uploadDone = renderer->GetUploadJobsCompleted ();
180+ const bool modelLoading = renderer->IsLoading ();
181+
182+ if (!modelLoading && uploadTotal > 0 && uploadDone < uploadTotal) {
183+ ImGuiIO& io = ImGui::GetIO ();
184+ const ImVec2 dispSize = io.DisplaySize ;
185+
186+ const float windowWidth = std::min (260 .0f , dispSize.x * 0 .35f );
187+ const float windowHeight = 60 .0f ;
188+ const ImVec2 winPos (dispSize.x - windowWidth - 10 .0f , 10 .0f );
189+
190+ ImGui::SetNextWindowPos (winPos, ImGuiCond_Always);
191+ ImGui::SetNextWindowSize (ImVec2 (windowWidth, windowHeight));
192+ ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar |
193+ ImGuiWindowFlags_NoResize |
194+ ImGuiWindowFlags_NoMove |
195+ ImGuiWindowFlags_NoScrollbar|
196+ ImGuiWindowFlags_NoSavedSettings |
197+ ImGuiWindowFlags_NoCollapse;
198+
199+ if (ImGui::Begin (" ##StreamingTextures" , nullptr , flags)) {
200+ ImGui::TextUnformatted (" Streaming textures to GPU" );
201+ float frac = (uploadTotal > 0 ) ? (float )uploadDone / (float )uploadTotal : 0 .0f ;
202+ ImGui::ProgressBar (frac, ImVec2 (-1 .0f , 0 .0f ));
203+ }
204+ ImGui::End ();
205+ }
206+ }
207+
175208 // Create HRTF Audio Control UI
176209 ImGui::Begin (" HRTF Audio Controls" );
177210 ImGui::Text (" Hello, Vulkan!" );
@@ -241,22 +274,6 @@ void ImGuiSystem::NewFrame() {
241274 ImGui::Text (" Note: Quality controls affect BRDF rendering only" );
242275 }
243276
244- ImGui::Separator ();
245-
246- // Sun position control (punctual light in GLTF)
247- ImGui::Text (" Sun Position in Sky:" );
248- if (renderer) {
249- float sun = renderer->GetSunPosition ();
250- if (ImGui::SliderFloat (" Sun Position" , &sun, 0 .0f , 1 .0f , " %.2f" )) {
251- renderer->SetSunPosition (sun);
252- }
253- ImGui::SameLine ();
254- if (ImGui::Button (" Noon" )) { sun = 0 .5f ; renderer->SetSunPosition (sun); }
255- ImGui::SameLine ();
256- if (ImGui::Button (" Night" )) { sun = 0 .0f ; renderer->SetSunPosition (sun); }
257- ImGui::Text (" Tip: 0/1 = Night, 0.5 = Noon. Warmer tint near horizon simulates evening." );
258- }
259-
260277 ImGui::Separator ();
261278 ImGui::Text (" 3D Audio Position Control" );
262279
0 commit comments