SpiecsEngine
 
Loading...
Searching...
No Matches

◆ OnTick()

void Spices::ViewPortResizeQuerier::OnTick ( TimeStep & ts)
overridevirtual

This interface defines the behave on specific component tick every frame.

Parameters
[in]tsTimeStep.

The first frame, we will not get register pointer.

Might not needed?

The first frame, we will not get register pointer.

Might not needed?

Implements Spices::NativeScript.

Definition at line 16 of file ViewPortResizeQuerier.cpp.

17 {
19
23 if (!SlateSystem::GetRegister()) return;
24
25 if (!m_ViewPort.lock()) m_ViewPort = SlateSystem::GetRegister()->GetViewPort();
26
27 if (m_ViewPort.lock()->IsResizedThisFrame())
28 {
32 VK_CHECK(vkQueueWaitIdle(VulkanRenderBackend::GetState().m_GraphicQueue))
33
34 SlateResizeEvent event(static_cast<uint32_t>(m_ViewPort.lock()->GetPanelSize().x), static_cast<uint32_t>(m_ViewPort.lock()->GetPanelSize().y));
35
37 }
38 }
#define SPICES_PROFILE_ZONE
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
Definition VulkanUtils.h:68
static EventCallbackFn GetEventCallbackFn()
Get Global Root Event Function Pointer.
Definition Event.cpp:17
static std::shared_ptr< SlateRegister > GetRegister()
Get slate register.
Definition SlateSystem.h:67
std::weak_ptr< ImguiViewport > m_ViewPort
viewport pointer.
static VulkanState & GetState()
Get VulkanState in use.

References Spices::Event::GetEventCallbackFn(), and Spices::VulkanRenderBackend::GetState().