MCPcopy Create free account
hub / github.com/JeanPhilippeKernel/RendererEngine / Run

Method Run

ZEngine/src/Engine.cpp:54–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 void Engine::Run() {
55
56 while (true) {
57
58 if (m_request_terminate) {
59 break;
60 }
61
62 float time = m_window->GetTime() / 1000.0f;
63 m_delta_time = time - m_last_frame_time;
64 m_last_frame_time = (m_delta_time >= 1.0f) ? m_last_frame_time : time + 1.0f; // waiting 1s to update
65
66 ProcessEvent();
67 if (!m_window->GetWindowProperty().IsMinimized) {
68 Update(m_delta_time);
69 Render();
70 }
71 }
72 }
73} // namespace ZEngine

Callers 2

CompileMethod · 0.45
ExecuteMethod · 0.45

Calls 1

GetTimeMethod · 0.45

Tested by

no test coverage detected