Class KHRXlibSurface
- java.lang.Object
-
- org.lwjgl.vulkan.KHRXlibSurface
-
public class KHRXlibSurface extends java.lang.Object
TheVK_KHR_xlib_surface
extension is an instance extension. It provides a mechanism to create aVkSurfaceKHR
object (defined by theVK_KHR_surface
extension) that refers to an X11 window, using the Xlib client-side library, as well as a query to determine support for rendering via Xlib.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
VK_KHR_XLIB_SURFACE_EXTENSION_NAME
The extension name.static int
VK_KHR_XLIB_SURFACE_SPEC_VERSION
The extension specification version.static int
VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR
VkStructureType
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static int
vkCreateXlibSurfaceKHR(VkInstance instance, VkXlibSurfaceCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSurface)
Array version of:CreateXlibSurfaceKHR
static int
vkCreateXlibSurfaceKHR(VkInstance instance, VkXlibSurfaceCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSurface)
Creates aVkSurfaceKHR
object for an X11 window, using the Xlib client-side library.static int
vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, int queueFamilyIndex, long dpy, long visualID)
Determines whether a queue family of a physical device supports presentation to an X11 server, using the Xlib client-side library.
-
-
-
Field Detail
-
VK_KHR_XLIB_SURFACE_SPEC_VERSION
public static final int VK_KHR_XLIB_SURFACE_SPEC_VERSION
The extension specification version.- See Also:
- Constant Field Values
-
VK_KHR_XLIB_SURFACE_EXTENSION_NAME
public static final java.lang.String VK_KHR_XLIB_SURFACE_EXTENSION_NAME
The extension name.- See Also:
- Constant Field Values
-
VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR
public static final int VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR
VkStructureType- See Also:
- Constant Field Values
-
-
Method Detail
-
vkCreateXlibSurfaceKHR
public static int vkCreateXlibSurfaceKHR(VkInstance instance, VkXlibSurfaceCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSurface)
Creates aVkSurfaceKHR
object for an X11 window, using the Xlib client-side library.Valid Usage
instance
must be a validVkInstance
handlepCreateInfo
must be a pointer to a validVkXlibSurfaceCreateInfoKHR
structure- If
pAllocator
is notNULL
,pAllocator
must be a pointer to a validVkAllocationCallbacks
structure pSurface
must be a pointer to aVkSurfaceKHR
handle
With Xlib,
minImageExtent
,maxImageExtent
, andcurrentExtent
are the window size. Therefore, a swapchain’simageExtent
must match the window’s size.Some Vulkan functions may send protocol over the specified Xlib Display connection when using a swapchain or presentable images created from a
VkSurface
referring to an Xlib window. Applications must therefore ensure the display connection is available to Vulkan for the duration of any functions that manipulate such swapchains or their presentable images, and any functions that build or queue command buffers that operate on such presentable images. Specifically, applications using Vulkan with Xlib-based swapchains must- Call
XInitThreads()
before calling any other Xlib functions if they intend to use Vulkan in multiple threads, or use Vulkan and Xlib in separate threads. - Avoid holding a server grab on a display connection while waiting for Vulkan operations to complete using a swapchain derived from a different display connection referring to the same X server instance. Failing to do so may result in deadlock.
- Parameters:
instance
- the instance to associate the surface withpCreateInfo
- a pointer to an instance of theVkXlibSurfaceCreateInfoKHR
structure containing the parameters affecting the creation of the surface objectpAllocator
- controls host memory allocationpSurface
- points to aVkSurfaceKHR
handle in which the created surface object is returned
-
vkGetPhysicalDeviceXlibPresentationSupportKHR
public static int vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, int queueFamilyIndex, long dpy, long visualID)
Determines whether a queue family of a physical device supports presentation to an X11 server, using the Xlib client-side library.This platform-specific function can be called prior to creating a surface.
Valid Usage
physicalDevice
must be a validVkPhysicalDevice
handledpy
must be a pointer to aDisplay
valuequeueFamilyIndex
must be less thanpQueueFamilyPropertyCount
returned byGetPhysicalDeviceQueueFamilyProperties
for the givenphysicalDevice
- Parameters:
physicalDevice
- the physical devicequeueFamilyIndex
- the queue family indexdpy
- a pointer to an XlibDisplay
connection to the servervisualID
- an X11 visual (VisualID)
-
vkCreateXlibSurfaceKHR
public static int vkCreateXlibSurfaceKHR(VkInstance instance, VkXlibSurfaceCreateInfoKHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSurface)
Array version of:CreateXlibSurfaceKHR
-
-