Class MVKMacosSurface


  • public class MVKMacosSurface
    extends java.lang.Object
    The VK_MVK_macos_surface extension is an instance extension. It provides a mechanism to create a VkSurfaceKHR object (defined by the VK_KHR_surface extension) based on an NSView, the native surface type of macOS, which is underpinned by a CAMetalLayer, to support rendering to the surface using Apple’s Metal framework.
    Deprecation by VK_EXT_metal_surface

    The VK_MVK_macos_surface extension is considered deprecated and has been superseded by the VK_EXT_metal_surface extension.

    VK_MVK_macos_surface
    Name String
    VK_MVK_macos_surface
    Extension Type
    Instance extension
    Registered Extension Number
    124
    Revision
    3
    Extension and Version Dependencies
    Deprecation state
    Contact
    Other Extension Metadata
    Last Modified Date
    2020-07-31
    IP Status
    No known IP claims.
    Contributors
    • Bill Hollings, The Brenwill Workshop Ltd.
    • Field Detail

      • VK_MVK_MACOS_SURFACE_SPEC_VERSION

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

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

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

      • nvkCreateMacOSSurfaceMVK

        public static int nvkCreateMacOSSurfaceMVK​(org.lwjgl.vulkan.VkInstance instance,
                                                   long pCreateInfo,
                                                   long pAllocator,
                                                   long pSurface)
        Unsafe version of: CreateMacOSSurfaceMVK
      • vkCreateMacOSSurfaceMVK

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

        To create a VkSurfaceKHR object for a macOS NSView or CAMetalLayer, call:

        
         VkResult vkCreateMacOSSurfaceMVK(
             VkInstance                                  instance,
             const VkMacOSSurfaceCreateInfoMVK*          pCreateInfo,
             const VkAllocationCallbacks*                pAllocator,
             VkSurfaceKHR*                               pSurface);
        Description
        Note

        The vkCreateMacOSSurfaceMVK function is considered deprecated and has been superseded by CreateMetalSurfaceEXT from the VK_EXT_metal_surface extension.

        Valid Usage (Implicit)
        • instance must be a valid VkInstance handle
        • pCreateInfo must be a valid pointer to a valid VkMacOSSurfaceCreateInfoMVK 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, VkMacOSSurfaceCreateInfoMVK

        Parameters:
        instance - the instance with which to associate the surface.
        pCreateInfo - a pointer to a VkMacOSSurfaceCreateInfoMVK structure containing 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.