vulkan并没有直接的显示窗口的,这块是由第三方的组件来实现的,我们可以直接调用glfw的接口直接创建surface1
2
3
4
5
6
7VkSurfaceKHR surface;
void createSurface() {
if (glfwCreateWindowSurface(instance, window, nullptr, &surface) != VK_SUCCESS) {
throw std::runtime_error("failed to create window surface!");
}
}