TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ Run()

void Application::Run ( std::string  loadFile = "")

Definition at line 145 of file Application.cpp.

146{
147 m_Window->SetVisible(true);
148 float oneSecCounter = 0;
149
150 while (isActive)
151 {
152 float currentTime = glfwGetTime();
153 float deltaTime = currentTime - previousTime;
154 previousTime = currentTime;
155 oneSecCounter += deltaTime;
156 OnUpdate(deltaTime);
157
158 if (oneSecCounter >= 1)
159 {
160 OnOneSecondTick();
161 oneSecCounter = 0;
162 }
163
164 Render();
165 m_Window->Update();
166 }
167
168 OnEnd();
169 ImGuiShutdown();
170}