Class EXTMetalSurface


  • public class EXTMetalSurface
    extends java.lang.Object
    The VK_EXT_metal_surface extension is an instance extension. It provides a mechanism to create a VkSurfaceKHR object (defined by the VK_KHR_surface extension) from CAMetalLayer, which is the native rendering surface of Apple’s Metal framework.
    VK_EXT_metal_surface
    Name String
    VK_EXT_metal_surface
    Extension Type
    Instance extension
    Registered Extension Number
    218
    Revision
    1
    Extension and Version Dependencies
    Contact
    Other Extension Metadata
    Last Modified Date
    2018-10-01
    IP Status
    No known IP claims.
    Contributors
    • Dzmitry Malyshau, Mozilla Corp.
    • Field Detail

      • VK_EXT_METAL_SURFACE_SPEC_VERSION

        public static final int VK_EXT_METAL_SURFACE_SPEC_VERSION
        The extension specification version.
        See Also:
        Constant Field Values
      • VK_EXT_METAL_SURFACE_EXTENSION_NAME

        public static final java.lang.String VK_EXT_METAL_SURFACE_EXTENSION_NAME
        The extension name.
        See Also:
        Constant Field Values
      • VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT

        public static final int VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT
        Extends VkStructureType.
        See Also:
        Constant Field Values
    • Method Detail

      • nvkCreateMetalSurfaceEXT

        public static int nvkCreateMetalSurfaceEXT​(org.lwjgl.vulkan.VkInstance instance,
                                                   long pCreateInfo,
                                                   long pAllocator,
                                                   long pSurface)
        Unsafe version of: CreateMetalSurfaceEXT
      • vkCreateMetalSurfaceEXT

        public static int vkCreateMetalSurfaceEXT​(org.lwjgl.vulkan.VkInstance instance,
                                                  VkMetalSurfaceCreateInfoEXT pCreateInfo,
                                                  @Nullable
                                                  VkAllocationCallbacks pAllocator,
                                                  java.nio.LongBuffer pSurface)
        Create a VkSurfaceKHR object for CAMetalLayer.
        C Specification

        To create a VkSurfaceKHR object for a CAMetalLayer, call:

        
         VkResult vkCreateMetalSurfaceEXT(
             VkInstance                                  instance,
             const VkMetalSurfaceCreateInfoEXT*          pCreateInfo,
             const VkAllocationCallbacks*                pAllocator,
             VkSurfaceKHR*                               pSurface);
        Valid Usage (Implicit)
        • instance must be a valid VkInstance handle
        • pCreateInfo must be a valid pointer to a valid VkMetalSurfaceCreateInfoEXT structure
        • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
        • pSurface must be a valid pointer to a VkSurfaceKHR handle
        Return Codes
        On success, this command returns
        On failure, this command returns
        See Also

        VkAllocationCallbacks, VkMetalSurfaceCreateInfoEXT

        Parameters:
        instance - the instance with which to associate the surface.
        pCreateInfo - a pointer to a VkMetalSurfaceCreateInfoEXT structure specifying parameters affecting the creation of the surface object.
        pAllocator - the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).
        pSurface - a pointer to a VkSurfaceKHR handle in which the created surface object is returned.