All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.MVKMacosSurface Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.vulkan;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;

/**
 * The {@code VK_MVK_macos_surface} extension is an instance extension. It provides a mechanism to create a {@code VkSurfaceKHR} object (defined by the {@link KHRSurface VK_KHR_surface} extension) based on an {@code NSView}, the native surface type of macOS, which is underpinned by a {@code CAMetalLayer}, to support rendering to the surface using Apple’s Metal framework.
 * 
 * 
Deprecation by {@code VK_EXT_metal_surface}
* *

The {@code VK_MVK_macos_surface} extension is considered deprecated and has been superseded by the {@link EXTMetalSurface VK_EXT_metal_surface} extension.

* *
VK_MVK_macos_surface
* *
*
Name String
*
{@code VK_MVK_macos_surface}
*
Extension Type
*
Instance extension
*
Registered Extension Number
*
124
*
Revision
*
3
*
Extension and Version Dependencies
*
    *
  • Requires Vulkan 1.0
  • *
  • Requires {@link KHRSurface VK_KHR_surface}
  • *
*
Deprecation state
*
    *
  • Deprecated by {@link EXTMetalSurface VK_EXT_metal_surface} extension
  • *
*
Contact
*
*
* *
Other Extension Metadata
* *
*
Last Modified Date
*
2020-07-31
*
IP Status
*
No known IP claims.
*
Contributors
*
    *
  • Bill Hollings, The Brenwill Workshop Ltd.
  • *
*
*/ public class MVKMacosSurface { /** The extension specification version. */ public static final int VK_MVK_MACOS_SURFACE_SPEC_VERSION = 3; /** The extension name. */ public static final String VK_MVK_MACOS_SURFACE_EXTENSION_NAME = "VK_MVK_macos_surface"; /** Extends {@code VkStructureType}. */ public static final int VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000; protected MVKMacosSurface() { throw new UnsupportedOperationException(); } // --- [ vkCreateMacOSSurfaceMVK ] --- /** Unsafe version of: {@link #vkCreateMacOSSurfaceMVK CreateMacOSSurfaceMVK} */ public static int nvkCreateMacOSSurfaceMVK(VkInstance instance, long pCreateInfo, long pAllocator, long pSurface) { long __functionAddress = instance.getCapabilities().vkCreateMacOSSurfaceMVK; if (CHECKS) { check(__functionAddress); VkMacOSSurfaceCreateInfoMVK.validate(pCreateInfo); if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); } } return callPPPPI(instance.address(), pCreateInfo, pAllocator, pSurface, __functionAddress); } /** * Create a VkSurfaceKHR object for a macOS NSView. * *
C Specification
* *

To create a {@code VkSurfaceKHR} object for a macOS {@code NSView} or {@code CAMetalLayer}, call:

* *

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

The {@code vkCreateMacOSSurfaceMVK} function is considered deprecated and has been superseded by {@link EXTMetalSurface#vkCreateMetalSurfaceEXT CreateMetalSurfaceEXT} from the {@link EXTMetalSurface VK_EXT_metal_surface} extension.

*
* *
Valid Usage (Implicit)
* *
    *
  • {@code instance} must be a valid {@code VkInstance} handle
  • *
  • {@code pCreateInfo} must be a valid pointer to a valid {@link VkMacOSSurfaceCreateInfoMVK} structure
  • *
  • If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
  • *
  • {@code pSurface} must be a valid pointer to a {@code VkSurfaceKHR} handle
  • *
* *
Return Codes
* *
*
On success, this command returns
*
    *
  • {@link VK10#VK_SUCCESS SUCCESS}
  • *
*
On failure, this command returns
*
    *
  • {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
  • *
  • {@link VK10#VK_ERROR_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
  • *
  • {@link KHRSurface#VK_ERROR_NATIVE_WINDOW_IN_USE_KHR ERROR_NATIVE_WINDOW_IN_USE_KHR}
  • *
*
* *
See Also
* *

{@link VkAllocationCallbacks}, {@link VkMacOSSurfaceCreateInfoMVK}

* * @param instance the instance with which to associate the surface. * @param pCreateInfo a pointer to a {@link VkMacOSSurfaceCreateInfoMVK} structure containing parameters affecting the creation of the surface object. * @param pAllocator the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation). * @param pSurface a pointer to a {@code VkSurfaceKHR} handle in which the created surface object is returned. */ @NativeType("VkResult") public static int vkCreateMacOSSurfaceMVK(VkInstance instance, @NativeType("VkMacOSSurfaceCreateInfoMVK const *") VkMacOSSurfaceCreateInfoMVK pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSurfaceKHR *") LongBuffer pSurface) { if (CHECKS) { check(pSurface, 1); } return nvkCreateMacOSSurfaceMVK(instance, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pSurface)); } /** Array version of: {@link #vkCreateMacOSSurfaceMVK CreateMacOSSurfaceMVK} */ @NativeType("VkResult") public static int vkCreateMacOSSurfaceMVK(VkInstance instance, @NativeType("VkMacOSSurfaceCreateInfoMVK const *") VkMacOSSurfaceCreateInfoMVK pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSurfaceKHR *") long[] pSurface) { long __functionAddress = instance.getCapabilities().vkCreateMacOSSurfaceMVK; if (CHECKS) { check(__functionAddress); check(pSurface, 1); VkMacOSSurfaceCreateInfoMVK.validate(pCreateInfo.address()); if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); } } return callPPPPI(instance.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pSurface, __functionAddress); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy