VKCREATEANDROIDSURFA(3)

NAME
vkCreateAndroidSurfaceKHR - create a VkSurfaceKHR object for an Android native window.

C SPECIFICATION

    VkResult vkCreateAndroidSurfaceKHR(
        VkInstance                                  instance,
        const VkAndroidSurfaceCreateInfoKHR*        pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkSurfaceKHR*                               pSurface);

PARAMETERS

instance
    The VkInstance to associate with the surface.

pCreateInfo
    A pointer to an instance of the VkAndroidSurfaceCreateInfoKHR 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

vkCreateAndroidSurfaceKHR creates a VkSurface associated with the specified android native window.

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

    typedef struct VkAndroidSurfaceCreateInfoKHR {
        VkStructureType                   sType;
        const void*                       pNext;
        VkAndroidSurfaceCreateFlagsKHR    flags;
        ANativeWindow*                    window;
    } VkAndroidSurfaceCreateInfoKHR;

VALID USAGE

    • instance must be a valid VkInstance handle

    • pCreateInfo must be a pointer to a valid VkAndroidSurfaceCreateInfoKHR 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

        • VK_ERROR_NATIVE_WINDOW_IN_USE_KHR

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.