SpiecsEngine
 
Loading...
Searching...
No Matches

◆ Run()

void Spices::Application::Run ( )
static

Run Our World.

Specify the current World, which created from Game.

Todo
Mult World Support.

World OnPreActivate.

Todo
Remove.

Init Golbal TimeStep Class.

Golbal While Loop.

Todo
Multithreading.

Wait for glfw events.

Update TimeStep.

Update Aftermath frame cut.

Activete Our Specific World.

Vulkan Device Idle.

Deactivate Our Specific World.

Specify the current World, which created from Game.

Todo
Mult World Support.

World OnPreActivate.

Todo
Remove.

Init Golbal TimeStep Class.

Golbal While Loop.

Todo
Multithreading.

Wait for glfw events.

Update TimeStep.

Update Aftermath frame cut.

Activete Our Specific World.

Vulkan Device Idle.

Deactivate Our Specific World.

Definition at line 77 of file Application.cpp.

78 {
84
89 FrameInfo::Get().m_World->OnPreActivate();
90
94 TimeStep ts;
95
100 while (!glfwWindowShouldClose(VulkanRenderBackend::GetState().m_Windows))
101 {
102 SPICES_PROFILE_ZONEN("MainLoop");
103
107 glfwPollEvents();
108
112 ts.Flush();
113
117 NSIGHTAFTERMATH_GPUCRASHTRACKER_SETFRAMECUT(ts.fs())
118
119
122 FrameInfo::Get().m_World->OnActivate(ts);
123
125 }
126
130 vkDeviceWaitIdle(VulkanRenderBackend::GetState().m_Device);
131
135 FrameInfo::Get().m_World->OnDeactivate();
136 }
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_FRAME
static FrameInfo & Get()
Get FrameInfo.
Definition FrameInfo.cpp:14
std::shared_ptr< World > m_World
The shared pointer of specific world.
Definition FrameInfo.h:94
static VulkanState & GetState()
Get VulkanState in use.
std::shared_ptr< World > CreateWorld()
extern WorldCreation definition in Game.
Definition EntryPoint.cpp:6

References Spices::TimeStep::Flush(), Spices::TimeStep::fs(), Spices::FrameInfo::Get(), and Spices::VulkanRenderBackend::GetState().

Referenced by main().