org.lwjgl.vulkan.KHRWaylandSurface Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-vulkan Show documentation
Show all versions of lwjgl-vulkan Show documentation
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.
/*
* 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_KHR_wayland_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) that refers to a Wayland {@code wl_surface}, as well as a query to determine support for rendering to a Wayland compositor.
*
* VK_KHR_wayland_surface
*
*
* - Name String
* - {@code VK_KHR_wayland_surface}
* - Extension Type
* - Instance extension
* - Registered Extension Number
* - 7
* - Revision
* - 6
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
* - Requires {@link KHRSurface VK_KHR_surface}
*
* - Contact
*
* - Jesse Hall critsec
* - Ian Elliott ianelliottus
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2015-11-28
* - IP Status
* - No known IP claims.
* - Contributors
*
* - Patrick Doane, Blizzard
* - Jason Ekstrand, Intel
* - Ian Elliott, LunarG
* - Courtney Goeltzenleuchter, LunarG
* - Jesse Hall, Google
* - James Jones, NVIDIA
* - Antoine Labour, Google
* - Jon Leech, Khronos
* - David Mao, AMD
* - Norbert Nopper, Freescale
* - Alon Or-bach, Samsung
* - Daniel Rakos, AMD
* - Graham Sellers, AMD
* - Ray Smith, ARM
* - Jeff Vigil, Qualcomm
* - Chia-I Wu, LunarG
*
*
*/
public class KHRWaylandSurface {
/** The extension specification version. */
public static final int VK_KHR_WAYLAND_SURFACE_SPEC_VERSION = 6;
/** The extension name. */
public static final String VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface";
/** Extends {@code VkStructureType}. */
public static final int VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000;
protected KHRWaylandSurface() {
throw new UnsupportedOperationException();
}
// --- [ vkCreateWaylandSurfaceKHR ] ---
/** Unsafe version of: {@link #vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR} */
public static int nvkCreateWaylandSurfaceKHR(VkInstance instance, long pCreateInfo, long pAllocator, long pSurface) {
long __functionAddress = instance.getCapabilities().vkCreateWaylandSurfaceKHR;
if (CHECKS) {
check(__functionAddress);
VkWaylandSurfaceCreateInfoKHR.validate(pCreateInfo);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
return callPPPPI(instance.address(), pCreateInfo, pAllocator, pSurface, __functionAddress);
}
/**
* Create a {@code VkSurfaceKHR} object for a Wayland window.
*
* C Specification
*
* To create a {@code VkSurfaceKHR} object for a Wayland surface, call:
*
*
* VkResult vkCreateWaylandSurfaceKHR(
* VkInstance instance,
* const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
* const VkAllocationCallbacks* pAllocator,
* VkSurfaceKHR* pSurface);
*
* Valid Usage (Implicit)
*
*
* - {@code instance} must be a valid {@code VkInstance} handle
* - {@code pCreateInfo} must be a valid pointer to a valid {@link VkWaylandSurfaceCreateInfoKHR} 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}
*
*
*
* See Also
*
* {@link VkAllocationCallbacks}, {@link VkWaylandSurfaceCreateInfoKHR}
*
* @param instance the instance to associate the surface with.
* @param pCreateInfo a pointer to a {@link VkWaylandSurfaceCreateInfoKHR} 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 vkCreateWaylandSurfaceKHR(VkInstance instance, @NativeType("VkWaylandSurfaceCreateInfoKHR const *") VkWaylandSurfaceCreateInfoKHR pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSurfaceKHR *") LongBuffer pSurface) {
if (CHECKS) {
check(pSurface, 1);
}
return nvkCreateWaylandSurfaceKHR(instance, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pSurface));
}
// --- [ vkGetPhysicalDeviceWaylandPresentationSupportKHR ] ---
/**
* Query physical device for presentation to Wayland.
*
* C Specification
*
* To determine whether a queue family of a physical device supports presentation to a Wayland compositor, call:
*
*
* VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
* VkPhysicalDevice physicalDevice,
* uint32_t queueFamilyIndex,
* struct wl_display* display);
*
* Description
*
* This platform-specific function can be called prior to creating a surface.
*
* Valid Usage
*
*
* - {@code queueFamilyIndex} must be less than {@code pQueueFamilyPropertyCount} returned by {@code vkGetPhysicalDeviceQueueFamilyProperties} for the given {@code physicalDevice}
*
*
* Valid Usage (Implicit)
*
*
* - {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
* - {@code display} must be a valid pointer to a {@code wl_display} value
*
*
* @param physicalDevice the physical device.
* @param queueFamilyIndex the queue family index.
* @param display a pointer to the {@code wl_display} associated with a Wayland compositor.
*/
@NativeType("VkBool32")
public static boolean vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, @NativeType("uint32_t") int queueFamilyIndex, @NativeType("struct wl_display *") long display) {
long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceWaylandPresentationSupportKHR;
if (CHECKS) {
check(__functionAddress);
check(display);
}
return callPPI(physicalDevice.address(), queueFamilyIndex, display, __functionAddress) != 0;
}
/** Array version of: {@link #vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR} */
@NativeType("VkResult")
public static int vkCreateWaylandSurfaceKHR(VkInstance instance, @NativeType("VkWaylandSurfaceCreateInfoKHR const *") VkWaylandSurfaceCreateInfoKHR pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSurfaceKHR *") long[] pSurface) {
long __functionAddress = instance.getCapabilities().vkCreateWaylandSurfaceKHR;
if (CHECKS) {
check(__functionAddress);
check(pSurface, 1);
VkWaylandSurfaceCreateInfoKHR.validate(pCreateInfo.address());
if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); }
}
return callPPPPI(instance.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pSurface, __functionAddress);
}
}