SpiecsEngine
 
Loading...
Searching...
No Matches

◆ RecreateSwapChain()

void Spices::VulkanRenderBackend::RecreateSwapChain ( )
private

Called OnSlateResize.

Get new size of Windows.

Might not needed?

Create an specific event.

Execute the global event function pointer by passing the specific event.

Get new size of Windows.

Might not needed?

Create an specific event.

Execute the global event function pointer by passing the specific event.

Definition at line 180 of file VulkanRenderBackend.cpp.

181 {
183
187 int width = 0, height = 0;
188 glfwGetFramebufferSize(m_VulkanState.m_Windows, &width, &height);
189 while (width == 0 || height == 0)
190 {
191 glfwGetFramebufferSize(m_VulkanState.m_Windows, &width, &height);
192 glfwWaitEvents();
193 }
194
198 VK_CHECK(vkQueueWaitIdle(m_VulkanState.m_GraphicQueue))
199
200
203 WindowResizeOverEvent event(width, height);
204
208 Event::GetEventCallbackFn()(event);
209 }
#define SPICES_PROFILE_ZONE
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
Definition VulkanUtils.h:68
static VulkanState m_VulkanState
The VulkanState in use.
GLFWwindow * m_Windows
Definition VulkanUtils.h:92

References Spices::Event::GetEventCallbackFn(), m_VulkanState, and Spices::WindowResizeOverEvent::WindowResizeOverEvent().

Referenced by BeginFrame(), and EndFrame().