Add GLFW_X11_XCB_VULKAN_SURFACE init hint

This hint controls whether GLFW will try to use VK_KHR_xcb_surface
before falling back to VK_KHR_xlib_surface.

Closes #1793.
This commit is contained in:
Nicolas Caramelli
2020-10-23 18:55:37 +02:00
committed by Camilla Löwy
parent f4a7329604
commit 84f95a7d7f
4 changed files with 21 additions and 3 deletions
+7 -1
View File
@@ -57,7 +57,10 @@ static _GLFWinitconfig _glfwInitHints =
{
GLFW_TRUE, // macOS menu bar
GLFW_TRUE // macOS bundle chdir
}
},
{
GLFW_TRUE, // X11 XCB Vulkan surface
},
};
// Terminate the library
@@ -298,6 +301,9 @@ GLFWAPI void glfwInitHint(int hint, int value)
case GLFW_COCOA_MENUBAR:
_glfwInitHints.ns.menubar = value;
return;
case GLFW_X11_XCB_VULKAN_SURFACE:
_glfwInitHints.x11.xcbVulkanSurface = value;
return;
}
_glfwInputError(GLFW_INVALID_ENUM,