VKCREATEXLIBSURFACEK(3)

NAME
vkCreateXlibSurfaceKHR - create a VkSurfaceKHR object for an X11 window, using the Xlib client-side library.

C SPECIFICATION

    VkResult vkCreateXlibSurfaceKHR(
        VkInstance                                  instance,
        const VkXlibSurfaceCreateInfoKHR*           pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

PARAMETERS

instance
    The VkInstance to associate the surface.

pCreateInfo
    A pointer to an instance of the VkXlibSurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object.

pAllocator
    The allocator used for host memory allocated for the surface object.

pSurface
    The resulting surface object handle is returned in pSurface.

DESCRIPTION

vkCreateXlibSurfaceKHR creates a VkSurface associated with the specified X11 window.

pCreateInfo is an instance of the VkXlibSurfaceCreateInfoKHR structure, the definition of which is:

    typedef struct VkXlibSurfaceCreateInfoKHR {
        VkStructureType                sType;
        const void*                    pNext;
        VkXlibSurfaceCreateFlagsKHR    flags;
        Display*                       dpy;
        Window                         window;
    } VkXlibSurfaceCreateInfoKHR;

VALID USAGE

    • instance must be a valid VkInstance handle

    • pCreateInfo must be a pointer to a valid VkXlibSurfaceCreateInfoKHR structure

    • If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure

    • pSurface must be a pointer to a VkSurfaceKHR handle

RETURN CODES

On success, this command returns

        • VK_SUCCESS

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

SEE ALSO

vkDestroySurfaceKHR, vkGetPhysicalDeviceSurfaceCapabilitiesKHR, vkGetPhysicalDeviceSurfaceFormatsKHR, vkGetPhysicalDeviceSurfacePresentModesKHR, vkCreateSwapchainKHR

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.