public class KHRDisplaySwapchain
extends java.lang.Object
The example code for the VK_KHR_display and VK_KHR_display_swapchain extensions was removed from the appendix after revision 1.0.43. The display swapchain creation example code was ported to the cube demo that is shipped with the official Khronos SDK, and is being kept up-to-date in that location (see: https://github.com/KhronosGroup/Vulkan-Tools/blob/master/cube/cube.c).
VK_KHR_display_swapchainVK_KHR_swapchainVK_KHR_display| Modifier and Type | Field and Description |
|---|---|
static int |
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR
Extends
VkResult. |
static java.lang.String |
VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME
The extension name.
|
static int |
VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION
The extension specification version.
|
static int |
VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR
Extends
VkStructureType. |
| Modifier and Type | Method and Description |
|---|---|
static int |
nvkCreateSharedSwapchainsKHR(org.lwjgl.vulkan.VkDevice device,
int swapchainCount,
long pCreateInfos,
long pAllocator,
long pSwapchains)
Unsafe version of:
CreateSharedSwapchainsKHR |
static int |
vkCreateSharedSwapchainsKHR(org.lwjgl.vulkan.VkDevice device,
VkSwapchainCreateInfoKHR.Buffer pCreateInfos,
VkAllocationCallbacks pAllocator,
long[] pSwapchains)
Array version of:
CreateSharedSwapchainsKHR |
static int |
vkCreateSharedSwapchainsKHR(org.lwjgl.vulkan.VkDevice device,
VkSwapchainCreateInfoKHR.Buffer pCreateInfos,
VkAllocationCallbacks pAllocator,
java.nio.LongBuffer pSwapchains)
Create multiple swapchains that share presentable images.
|
public static final int VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION
public static final java.lang.String VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME
public static final int VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR
VkStructureType.public static final int VK_ERROR_INCOMPATIBLE_DISPLAY_KHR
VkResult.public static int nvkCreateSharedSwapchainsKHR(org.lwjgl.vulkan.VkDevice device,
int swapchainCount,
long pCreateInfos,
long pAllocator,
long pSwapchains)
CreateSharedSwapchainsKHRswapchainCount - the number of swapchains to create.public static int vkCreateSharedSwapchainsKHR(org.lwjgl.vulkan.VkDevice device,
VkSwapchainCreateInfoKHR.Buffer pCreateInfos,
@Nullable
VkAllocationCallbacks pAllocator,
java.nio.LongBuffer pSwapchains)
When the VK_KHR_display_swapchain extension is enabled, multiple swapchains that share presentable images are created by calling:
VkResult vkCreateSharedSwapchainsKHR(
VkDevice device,
uint32_t swapchainCount,
const VkSwapchainCreateInfoKHR* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
VkSwapchainKHR* pSwapchains);
vkCreateSharedSwapchainsKHR is similar to CreateSwapchainKHR, except that it takes an array of VkSwapchainCreateInfoKHR structures, and returns an array of swapchain objects.
The swapchain creation parameters that affect the properties and number of presentable images must match between all the swapchains. If the displays used by any of the swapchains do not use the same presentable image layout or are incompatible in a way that prevents sharing images, swapchain creation will fail with the result code ERROR_INCOMPATIBLE_DISPLAY_KHR. If any error occurs, no swapchains will be created. Images presented to multiple swapchains must be re-acquired from all of them before transitioning away from IMAGE_LAYOUT_PRESENT_SRC_KHR. After destroying one or more of the swapchains, the remaining swapchains and the presentable images can continue to be used.
device must be a valid VkDevice handlepCreateInfos must be a valid pointer to an array of swapchainCount valid VkSwapchainCreateInfoKHR structurespAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structurepSwapchains must be a valid pointer to an array of swapchainCount VkSwapchainKHR handlesswapchainCount must be greater than 0pCreateInfos[].surface must be externally synchronizedpCreateInfos[].oldSwapchain must be externally synchronizeddevice - the device to create the swapchains for.pCreateInfos - a pointer to an array of VkSwapchainCreateInfoKHR structures specifying the parameters of the created swapchains.pAllocator - the allocator used for host memory allocated for the swapchain objects when there is no more specific allocator available (see Memory Allocation).pSwapchains - a pointer to an array of VkSwapchainKHR handles in which the created swapchain objects will be returned.public static int vkCreateSharedSwapchainsKHR(org.lwjgl.vulkan.VkDevice device,
VkSwapchainCreateInfoKHR.Buffer pCreateInfos,
@Nullable
VkAllocationCallbacks pAllocator,
long[] pSwapchains)
CreateSharedSwapchainsKHRCopyright LWJGL. All Rights Reserved. License terms.