| 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 | { |
nothing calls this directly
no test coverage detected