MCPcopy Create free account
hub / github.com/defold/defold / VulkanCloseWindow

Function VulkanCloseWindow

engine/graphics/src/vulkan/graphics_native.cpp:145–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143 }
144
145 void VulkanCloseWindow(HContext _context)
146 {
147 VulkanContext* context = (VulkanContext*) _context;
148 if (dmPlatform::GetWindowStateParam(context->m_BaseContext.m_Window, WINDOW_STATE_OPENED))
149 {
150 VkDevice vk_device = context->m_LogicalDevice.m_Device;
151
152 SynchronizeDevice(vk_device);
153
154 VulkanDestroyResources(_context);
155
156 vkDestroySurfaceKHR(context->m_Instance, context->m_WindowSurface, 0);
157
158 DestroyInstance(&context->m_Instance);
159
160 if (context->m_DynamicOffsetBuffer)
161 {
162 free(context->m_DynamicOffsetBuffer);
163 }
164
165 delete context->m_SwapChain;
166 }
167 }
168
169 void VulkanSetWindowSize(HContext _context, uint32_t width, uint32_t height)
170 {

Callers

nothing calls this directly

Calls 5

SynchronizeDeviceFunction · 0.85
VulkanDestroyResourcesFunction · 0.85
freeFunction · 0.85
DestroyInstanceFunction · 0.70
GetWindowStateParamFunction · 0.50

Tested by

no test coverage detected