Class KHRVulkanEnable2
This extension enables the use of the Vulkan graphics API in an OpenXR runtime. Without this extension, the OpenXR runtime may not be able to use any Vulkan swapchain images.
This extension provides the mechanisms necessary for an application to generate a valid XrGraphicsBindingVulkan2KHR structure in order to create a Vulkan-based XrSession.
This extension also provides mechanisms for the application to interact with images acquired by calling EnumerateSwapchainImages.
In order to expose the structures, types, and functions of this extension, you must define USE_GRAPHICS_API_VULKAN before including the OpenXR platform header openxr_platform.h, in all portions of your library or application that include it.
Note
This extension is intended as an alternative to XR_KHR_vulkan_enable, and does not depend on it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrCreateVulkanDeviceKHR(org.lwjgl.openxr.XrInstance instance, long createInfo, long vulkanDevice, long vulkanResult) Unsafe version of:CreateVulkanDeviceKHRstatic intnxrCreateVulkanInstanceKHR(org.lwjgl.openxr.XrInstance instance, long createInfo, long vulkanInstance, long vulkanResult) Unsafe version of:CreateVulkanInstanceKHRstatic intnxrGetVulkanGraphicsDevice2KHR(org.lwjgl.openxr.XrInstance instance, long getInfo, long vulkanPhysicalDevice) Unsafe version of:GetVulkanGraphicsDevice2KHRstatic intnxrGetVulkanGraphicsRequirements2KHR(org.lwjgl.openxr.XrInstance instance, long systemId, long graphicsRequirements) Unsafe version of:GetVulkanGraphicsRequirements2KHRstatic intxrCreateVulkanDeviceKHR(org.lwjgl.openxr.XrInstance instance, XrVulkanDeviceCreateInfoKHR createInfo, org.lwjgl.PointerBuffer vulkanDevice, IntBuffer vulkanResult) Create an OpenXR compatible VkDevice.static intxrCreateVulkanInstanceKHR(org.lwjgl.openxr.XrInstance instance, XrVulkanInstanceCreateInfoKHR createInfo, org.lwjgl.PointerBuffer vulkanInstance, IntBuffer vulkanResult) Create an OpenXR compatible VkInstance.static intxrGetVulkanGraphicsDevice2KHR(org.lwjgl.openxr.XrInstance instance, XrVulkanGraphicsDeviceGetInfoKHR getInfo, org.lwjgl.PointerBuffer vulkanPhysicalDevice) Retrieve the Vulkan physical device associated with an OpenXR instance and system.static intxrGetVulkanGraphicsRequirements2KHR(org.lwjgl.openxr.XrInstance instance, long systemId, XrGraphicsRequirementsVulkanKHR graphicsRequirements)
-
Field Details
-
XR_KHR_vulkan_enable2_SPEC_VERSION
public static final int XR_KHR_vulkan_enable2_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_KHR_VULKAN_ENABLE2_EXTENSION_NAME
The extension name.- See Also:
-
XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR
public static final int XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHRExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHR
public static final int XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHRExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR
public static final int XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHRExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR
public static final int XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHRExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR
public static final int XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHRExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR
public static final int XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHRExtendsXrStructureType.Enum values:
- See Also:
-
-
Method Details
-
nxrCreateVulkanInstanceKHR
public static int nxrCreateVulkanInstanceKHR(org.lwjgl.openxr.XrInstance instance, long createInfo, long vulkanInstance, long vulkanResult) Unsafe version of:CreateVulkanInstanceKHR -
xrCreateVulkanInstanceKHR
public static int xrCreateVulkanInstanceKHR(org.lwjgl.openxr.XrInstance instance, XrVulkanInstanceCreateInfoKHR createInfo, org.lwjgl.PointerBuffer vulkanInstance, IntBuffer vulkanResult) Create an OpenXR compatible VkInstance.C Specification
XrResult xrCreateVulkanInstanceKHR( XrInstance instance, const XrVulkanInstanceCreateInfoKHR* createInfo, VkInstance* vulkanInstance, VkResult* vulkanResult);Valid Usage (Implicit)
- The
XR_KHR_vulkan_enable2extension must be enabled prior to callingCreateVulkanInstanceKHR instancemust be a validXrInstancehandlecreateInfomust be a pointer to a validXrVulkanInstanceCreateInfoKHRstructurevulkanInstancemust be a pointer to aVkInstancevaluevulkanResultmust be a pointer to aVkResultvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- anXrInstancehandle previously created withCreateInstance.createInfo- extensible input struct of typeXrVulkanInstanceCreateInfoKHRvulkanInstance- points to aVkInstancehandle to populate with the new Vulkan instance.vulkanResult- points to aVkResultto populate with the result of thevkCreateInstanceoperation as returned byXrVulkanInstanceCreateInfoKHR::pfnGetInstanceProcAddr.
- The
-
nxrCreateVulkanDeviceKHR
public static int nxrCreateVulkanDeviceKHR(org.lwjgl.openxr.XrInstance instance, long createInfo, long vulkanDevice, long vulkanResult) Unsafe version of:CreateVulkanDeviceKHR -
xrCreateVulkanDeviceKHR
public static int xrCreateVulkanDeviceKHR(org.lwjgl.openxr.XrInstance instance, XrVulkanDeviceCreateInfoKHR createInfo, org.lwjgl.PointerBuffer vulkanDevice, IntBuffer vulkanResult) Create an OpenXR compatible VkDevice.C Specification
XrResult xrCreateVulkanDeviceKHR( XrInstance instance, const XrVulkanDeviceCreateInfoKHR* createInfo, VkDevice* vulkanDevice, VkResult* vulkanResult);Valid Usage (Implicit)
- The
XR_KHR_vulkan_enable2extension must be enabled prior to callingCreateVulkanDeviceKHR instancemust be a validXrInstancehandlecreateInfomust be a pointer to a validXrVulkanDeviceCreateInfoKHRstructurevulkanDevicemust be a pointer to aVkDevicevaluevulkanResultmust be a pointer to aVkResultvalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- anXrInstancehandle previously created withCreateInstance.createInfo- extensible input struct of typeXrCreateVulkanDeviceCreateInfoKHRvulkanDevice- points to aVkDevicehandle to populate with the new Vulkan device.vulkanResult- points to aVkResultto populate with the result of thevkCreateDeviceoperation as returned byXrVulkanInstanceCreateInfoKHR::pfnGetInstanceProcAddr.
- The
-
nxrGetVulkanGraphicsDevice2KHR
public static int nxrGetVulkanGraphicsDevice2KHR(org.lwjgl.openxr.XrInstance instance, long getInfo, long vulkanPhysicalDevice) Unsafe version of:GetVulkanGraphicsDevice2KHR -
xrGetVulkanGraphicsDevice2KHR
public static int xrGetVulkanGraphicsDevice2KHR(org.lwjgl.openxr.XrInstance instance, XrVulkanGraphicsDeviceGetInfoKHR getInfo, org.lwjgl.PointerBuffer vulkanPhysicalDevice) Retrieve the Vulkan physical device associated with an OpenXR instance and system.C Specification
XrResult xrGetVulkanGraphicsDevice2KHR( XrInstance instance, const XrVulkanGraphicsDeviceGetInfoKHR* getInfo, VkPhysicalDevice* vulkanPhysicalDevice);Valid Usage (Implicit)
- The
XR_KHR_vulkan_enable2extension must be enabled prior to callingGetVulkanGraphicsDevice2KHR instancemust be a validXrInstancehandlegetInfomust be a pointer to a validXrVulkanGraphicsDeviceGetInfoKHRstructurevulkanPhysicalDevicemust be a pointer to aVkPhysicalDevicevalue
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
instance- anXrInstancehandle previously created withCreateInstance.getInfo- extensible input struct of typeXrVulkanGraphicsDeviceGetInfoKHRvulkanPhysicalDevice- a pointer to aVkPhysicalDevicehandle to populate.
- The
-
nxrGetVulkanGraphicsRequirements2KHR
public static int nxrGetVulkanGraphicsRequirements2KHR(org.lwjgl.openxr.XrInstance instance, long systemId, long graphicsRequirements) Unsafe version of:GetVulkanGraphicsRequirements2KHR -
xrGetVulkanGraphicsRequirements2KHR
public static int xrGetVulkanGraphicsRequirements2KHR(org.lwjgl.openxr.XrInstance instance, long systemId, XrGraphicsRequirementsVulkanKHR graphicsRequirements) - Parameters:
instance- anXrInstancehandle previously created withCreateInstance.systemId- anXrSystemIdhandle for the system which will be used to create a session.graphicsRequirements- theXrGraphicsRequirementsVulkanKHRoutput structure.
-