MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Run

Method Run

ogsr_engine/xr_3da/device.cpp:424–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424void CRenderDevice::Run()
425{
426 // DUMP_PHASE;
427 g_bLoaded = FALSE;
428
429 Log("Starting engine...");
430
431 set_current_thread_name("X-RAY Primary thread");
432 mainThreadId = std::this_thread::get_id();
433 Msg("Main thread id: [%u]", _Thrd_id());
434
435 // Startup timers and calculate timer delta
436 dwTimeGlobal = 0;
437 Timer_MM_Delta = 0;
438 {
439 u32 time_mm = timeGetTime();
440 while (timeGetTime() == time_mm)
441 ; // wait for next tick
442 u32 time_system = timeGetTime();
443 u32 time_local = TimerAsync();
444 Timer_MM_Delta = time_system - time_local;
445 }
446
447 // Message cycle
448 seqAppStart.Process(rp_AppStart);
449
450 ::Render->ClearTarget();
451
452 // Destroy LOGO
453 HideSplash();
454
455 ShowMainWindow();
456
457 pInput->clip_cursor(true);
458
459 Memory.mem_compact();
460
461 g_bLoaded = TRUE;
462
463 message_loop();
464
465 g_bLoaded = FALSE;
466
467 seqAppEnd.Process(rp_AppEnd);
468}
469
470u32 app_inactive_time = 0;
471u32 app_inactive_time_start = 0;

Callers 1

StartupFunction · 0.80

Calls 9

LogFunction · 0.85
set_current_thread_nameFunction · 0.85
MsgFunction · 0.85
TimerAsyncFunction · 0.85
HideSplashFunction · 0.85
ClearTargetMethod · 0.80
clip_cursorMethod · 0.80
mem_compactMethod · 0.80
ProcessMethod · 0.45

Tested by

no test coverage detected