Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class KHRVulkanEnable2

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.*, org.lwjgl.system.*, org.lwjgl.vulkan.*

The XR_KHR_vulkan_enable2 extension.

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

Modifier and TypeField and Description
public static final String
public static final int
XR_KHR_vulkan_enable2_SPEC_VERSION

The extension specification version.

public static final int
XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR

Extends XrStructureType.

public static final int
public static final int
XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR

Extends XrStructureType.

public static final int
XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHR

Extends XrStructureType.

public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrCreateVulkanDeviceKHR(XrInstance instance, long createInfo, long vulkanDevice, long vulkanResult)

Unsafe version of: CreateVulkanDeviceKHR

public static int
nxrCreateVulkanInstanceKHR(XrInstance instance, long createInfo, long vulkanInstance, long vulkanResult)

Unsafe version of: CreateVulkanInstanceKHR

public static int
nxrGetVulkanGraphicsDevice2KHR(XrInstance instance, long getInfo, long vulkanPhysicalDevice)

Unsafe version of: GetVulkanGraphicsDevice2KHR

public static int
nxrGetVulkanGraphicsRequirements2KHR(XrInstance instance, long systemId, long graphicsRequirements)

Unsafe version of: GetVulkanGraphicsRequirements2KHR

public static int
xrCreateVulkanDeviceKHR(XrInstance
an XrInstance handle previously created with CreateInstance.
instance
,
XrVulkanDeviceCreateInfoKHR
extensible input struct of type XrCreateVulkanDeviceCreateInfoKHR
createInfo
,
PointerBuffer
points to a VkDevice handle to populate with the new Vulkan device.
vulkanDevice
,
IntBuffer
points to a VkResult to populate with the result of the vkCreateDevice operation as returned by pfnGetInstanceProcAddr.
vulkanResult
)

Create an OpenXR compatible VkDevice.

public static int
xrCreateVulkanInstanceKHR(XrInstance
an XrInstance handle previously created with CreateInstance.
instance
,
XrVulkanInstanceCreateInfoKHR
extensible input struct of type XrVulkanInstanceCreateInfoKHR
createInfo
,
PointerBuffer
points to a VkInstance handle to populate with the new Vulkan instance.
vulkanInstance
,
IntBuffer
points to a VkResult to populate with the result of the vkCreateInstance operation as returned by pfnGetInstanceProcAddr.
vulkanResult
)

Create an OpenXR compatible VkInstance.

public static int
xrGetVulkanGraphicsDevice2KHR(XrInstance
an XrInstance handle previously created with CreateInstance.
instance
,
XrVulkanGraphicsDeviceGetInfoKHR
extensible input struct of type XrVulkanGraphicsDeviceGetInfoKHR
getInfo
,
PointerBuffer
a pointer to a VkPhysicalDevice handle to populate.
vulkanPhysicalDevice
)

Retrieve the Vulkan physical device associated with an OpenXR instance and system.

public static int
xrGetVulkanGraphicsRequirements2KHR(XrInstance
an XrInstance handle previously created with CreateInstance.
instance
,
long
an XrSystemId handle for the system which will be used to create a session.
systemId
,
XrGraphicsRequirementsVulkanKHR
the XrGraphicsRequirementsVulkanKHR output structure.
graphicsRequirements
)

See GetVulkanGraphicsRequirementsKHR.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_KHR_VULKAN_ENABLE2_EXTENSION_NAMEback to summary
public static final String XR_KHR_VULKAN_ENABLE2_EXTENSION_NAME

The extension name.

XR_KHR_vulkan_enable2_SPEC_VERSIONback to summary
public static final int XR_KHR_vulkan_enable2_SPEC_VERSION

The extension specification version.

XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHRback to summary
public static final int XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR

Extends XrStructureType.

Enum values:
XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHRback to summary
public static final int XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR

Extends XrStructureType.

Enum values:
XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHRback to summary
public static final int XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR

Extends XrStructureType.

Enum values:
XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHRback to summary
public static final int XR_TYPE_VULKAN_DEVICE_CREATE_INFO_KHR

Extends XrStructureType.

Enum values:
XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHRback to summary
public static final int XR_TYPE_VULKAN_GRAPHICS_DEVICE_GET_INFO_KHR

Extends XrStructureType.

Enum values:
XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHRback to summary
public static final int XR_TYPE_VULKAN_INSTANCE_CREATE_INFO_KHR

Extends XrStructureType.

Enum values:

Constructor Detail

KHRVulkanEnable2back to summary
protected KHRVulkanEnable2()

Method Detail

nxrCreateVulkanDeviceKHRback to summary
public static int nxrCreateVulkanDeviceKHR(XrInstance instance, long createInfo, long vulkanDevice, long vulkanResult)

Unsafe version of: CreateVulkanDeviceKHR

nxrCreateVulkanInstanceKHRback to summary
public static int nxrCreateVulkanInstanceKHR(XrInstance instance, long createInfo, long vulkanInstance, long vulkanResult)

Unsafe version of: CreateVulkanInstanceKHR

nxrGetVulkanGraphicsDevice2KHRback to summary
public static int nxrGetVulkanGraphicsDevice2KHR(XrInstance instance, long getInfo, long vulkanPhysicalDevice)

Unsafe version of: GetVulkanGraphicsDevice2KHR

nxrGetVulkanGraphicsRequirements2KHRback to summary
public static int nxrGetVulkanGraphicsRequirements2KHR(XrInstance instance, long systemId, long graphicsRequirements)

Unsafe version of: GetVulkanGraphicsRequirements2KHR

xrCreateVulkanDeviceKHRback to summary
public static int xrCreateVulkanDeviceKHR(XrInstance instance, XrVulkanDeviceCreateInfoKHR createInfo, 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)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrVulkanDeviceCreateInfoKHR, CreateVulkanInstanceKHR

Parameters
instance:XrInstance

an XrInstance handle previously created with CreateInstance.

createInfo:XrVulkanDeviceCreateInfoKHR

extensible input struct of type XrCreateVulkanDeviceCreateInfoKHR

vulkanDevice:PointerBuffer

points to a VkDevice handle to populate with the new Vulkan device.

vulkanResult:IntBuffer

points to a VkResult to populate with the result of the vkCreateDevice operation as returned by pfnGetInstanceProcAddr.

Annotations
@NativeType:XrResult
xrCreateVulkanInstanceKHRback to summary
public static int xrCreateVulkanInstanceKHR(XrInstance instance, XrVulkanInstanceCreateInfoKHR createInfo, 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)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrVulkanInstanceCreateInfoKHR, CreateVulkanDeviceKHR

Parameters
instance:XrInstance

an XrInstance handle previously created with CreateInstance.

createInfo:XrVulkanInstanceCreateInfoKHR

extensible input struct of type XrVulkanInstanceCreateInfoKHR

vulkanInstance:PointerBuffer

points to a VkInstance handle to populate with the new Vulkan instance.

vulkanResult:IntBuffer

points to a VkResult to populate with the result of the vkCreateInstance operation as returned by pfnGetInstanceProcAddr.

Annotations
@NativeType:XrResult
xrGetVulkanGraphicsDevice2KHRback to summary
public static int xrGetVulkanGraphicsDevice2KHR(XrInstance instance, XrVulkanGraphicsDeviceGetInfoKHR getInfo, 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)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrVulkanGraphicsDeviceGetInfoKHR

Parameters
instance:XrInstance

an XrInstance handle previously created with CreateInstance.

getInfo:XrVulkanGraphicsDeviceGetInfoKHR

extensible input struct of type XrVulkanGraphicsDeviceGetInfoKHR

vulkanPhysicalDevice:PointerBuffer

a pointer to a VkPhysicalDevice handle to populate.

Annotations
@NativeType:XrResult
xrGetVulkanGraphicsRequirements2KHRback to summary
public static int xrGetVulkanGraphicsRequirements2KHR(XrInstance instance, long systemId, XrGraphicsRequirementsVulkanKHR graphicsRequirements)

See GetVulkanGraphicsRequirementsKHR.

Parameters
instance:XrInstance

an XrInstance handle previously created with CreateInstance.

systemId:long

an XrSystemId handle for the system which will be used to create a session.

graphicsRequirements:XrGraphicsRequirementsVulkanKHR

the XrGraphicsRequirementsVulkanKHR output structure.

Annotations
@NativeType:XrResult