MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / ProgressBarStart

Function ProgressBarStart

Rtxpt/SampleCommon/SampleCommon.cpp:347–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347int ProgressBarStart(const char * windowText)
348{
349 // progress bar currently interfering with fullscreen so disable
350 if (IsWindowFullscreen())
351 return -1;
352
353 for (int i = 0; i < g_ProgressSlotCount; i++)
354 {
355 std::lock_guard guard(g_ProgressSlots[i].Mutex);
356 ProgressBarGlobals & slot = g_ProgressSlots[i];
357 if (!slot.Active)
358 {
359 slot.Active = true;
360 slot.Title = windowText;
361 slot.Value = 0;
362 assert(!slot.Thread.joinable());
363
364 slot.Thread = std::thread(ShowProgressWindow, i);
365 return i;
366 }
367 }
368 return -1;
369}
370
371void ProgressBarStop(int slotIndex)
372{

Callers 1

StartMethod · 0.85

Calls 1

IsWindowFullscreenFunction · 0.85

Tested by

no test coverage detected