MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / AppCreateWin32Surface

Function AppCreateWin32Surface

vulkaninfo/vulkaninfo.h:842–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840}
841
842static VkSurfaceKHR AppCreateWin32Surface(AppInstance &inst) {
843 VkWin32SurfaceCreateInfoKHR createInfo;
844 createInfo.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
845 createInfo.pNext = nullptr;
846 createInfo.flags = 0;
847 createInfo.hinstance = inst.h_instance;
848 createInfo.hwnd = inst.h_wnd;
849
850 VkSurfaceKHR surface;
851 VkResult err = vkCreateWin32SurfaceKHR(inst.instance, &createInfo, nullptr, &surface);
852 if (err) THROW_VK_ERR("vkCreateWin32SurfaceKHR", err);
853 return surface;
854}
855
856static void AppDestroyWin32Window(AppInstance &inst) { user32_handles->pfnDestroyWindow(inst.h_wnd); }
857#endif // VK_USE_PLATFORM_WIN32_KHR

Callers

nothing calls this directly

Calls 1

vkCreateWin32SurfaceKHRFunction · 0.85

Tested by

no test coverage detected