public class VkPresentInfoKHR
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Before an application can present an image, the image's layout must be transitioned to the IMAGE_LAYOUT_PRESENT_SRC_KHR layout, or for a shared presentable image the IMAGE_LAYOUT_SHARED_PRESENT_KHR layout.
When transitioning the image to IMAGE_LAYOUT_SHARED_PRESENT_KHR or IMAGE_LAYOUT_PRESENT_SRC_KHR, there is no need to delay subsequent processing, or perform any visibility operations (as QueuePresentKHR performs automatic visibility operations). To achieve this, the dstAccessMask member of the VkImageMemoryBarrier should be set to 0, and the dstStageMask parameter should be set to PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT.
pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the IMAGE_LAYOUT_PRESENT_SRC_KHR or IMAGE_LAYOUT_SHARED_PRESENT_KHR layout at the time the operation is executed on a VkDevicepWaitSemaphores must have a VkSemaphoreTypeKHR of SEMAPHORE_TYPE_BINARY_KHRsType must be STRUCTURE_TYPE_PRESENT_INFO_KHRpNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupPresentInfoKHR, VkDisplayPresentInfoKHR, VkPresentRegionsKHR, or VkPresentTimesInfoGOOGLEsType member in the pNext chain must be uniquewaitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handlespSwapchains must be a valid pointer to an array of swapchainCount valid VkSwapchainKHR handlespImageIndices must be a valid pointer to an array of swapchainCount uint32_t valuespResults is not NULL, pResults must be a valid pointer to an array of swapchainCount VkResult valuesswapchainCount must be greater than 0pSwapchains, and the elements of pWaitSemaphores that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkInstancesType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.waitSemaphoreCount – the number of semaphores to wait for before issuing the present request. The number may be zero.pWaitSemaphores – NULL or a pointer to an array of VkSemaphore objects with waitSemaphoreCount entries, and specifies the semaphores to wait for before issuing the present request.swapchainCount – the number of swapchains being presented to by this command.pSwapchains – a pointer to an array of VkSwapchainKHR objects with swapchainCount entries. A given swapchain must not appear in this list more than once.pImageIndices – a pointer to an array of indices into the array of each swapchain’s presentable images, with swapchainCount entries. Each entry in this array identifies the image to present on the corresponding entry in the pSwapchains array.pResults – a pointer to an array of VkResult typed elements with swapchainCount entries. Applications that do not need per-swapchain results can use NULL for pResults. If non-NULL, each entry in pResults will be set to the VkResult for presenting the swapchain corresponding to the same index in pSwapchains.
struct VkPresentInfoKHR {
VkStructureType sType;
void const * pNext;
uint32_t waitSemaphoreCount;
VkSemaphore const * pWaitSemaphores;
uint32_t swapchainCount;
VkSwapchainKHR const * pSwapchains;
uint32_t const * pImageIndices;
VkResult * pResults;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkPresentInfoKHR.Buffer
An array of
VkPresentInfoKHR structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
PIMAGEINDICES
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
PRESULTS
The struct member offsets.
|
static int |
PSWAPCHAINS
The struct member offsets.
|
static int |
PWAITSEMAPHORES
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
static int |
SWAPCHAINCOUNT
The struct member offsets.
|
static int |
WAITSEMAPHORECOUNT
The struct member offsets.
|
| Constructor and Description |
|---|
VkPresentInfoKHR(java.nio.ByteBuffer container)
Creates a
VkPresentInfoKHR instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkPresentInfoKHR |
calloc()
Returns a new
VkPresentInfoKHR instance allocated with memCalloc. |
static VkPresentInfoKHR.Buffer |
calloc(int capacity)
Returns a new
VkPresentInfoKHR.Buffer instance allocated with memCalloc. |
static VkPresentInfoKHR |
callocStack()
Returns a new
VkPresentInfoKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkPresentInfoKHR.Buffer |
callocStack(int capacity)
Returns a new
VkPresentInfoKHR.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkPresentInfoKHR.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkPresentInfoKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkPresentInfoKHR |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkPresentInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkPresentInfoKHR |
create()
Returns a new
VkPresentInfoKHR instance allocated with BufferUtils. |
static VkPresentInfoKHR.Buffer |
create(int capacity)
Returns a new
VkPresentInfoKHR.Buffer instance allocated with BufferUtils. |
static VkPresentInfoKHR |
create(long address)
Returns a new
VkPresentInfoKHR instance for the specified memory address. |
static VkPresentInfoKHR.Buffer |
create(long address,
int capacity)
Create a
VkPresentInfoKHR.Buffer instance at the specified memory. |
static VkPresentInfoKHR |
createSafe(long address)
|
static VkPresentInfoKHR.Buffer |
createSafe(long address,
int capacity)
|
static VkPresentInfoKHR |
malloc()
Returns a new
VkPresentInfoKHR instance allocated with memAlloc. |
static VkPresentInfoKHR.Buffer |
malloc(int capacity)
Returns a new
VkPresentInfoKHR.Buffer instance allocated with memAlloc. |
static VkPresentInfoKHR |
mallocStack()
Returns a new
VkPresentInfoKHR instance allocated on the thread-local MemoryStack. |
static VkPresentInfoKHR.Buffer |
mallocStack(int capacity)
Returns a new
VkPresentInfoKHR.Buffer instance allocated on the thread-local MemoryStack. |
static VkPresentInfoKHR.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkPresentInfoKHR.Buffer instance allocated on the specified MemoryStack. |
static VkPresentInfoKHR |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkPresentInfoKHR instance allocated on the specified MemoryStack. |
static java.nio.IntBuffer |
npImageIndices(long struct)
Unsafe version of
pImageIndices. |
static void |
npImageIndices(long struct,
java.nio.IntBuffer value)
Unsafe version of
pImageIndices. |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static java.nio.IntBuffer |
npResults(long struct)
Unsafe version of
pResults. |
static void |
npResults(long struct,
java.nio.IntBuffer value)
Unsafe version of
pResults. |
static java.nio.LongBuffer |
npSwapchains(long struct)
Unsafe version of
pSwapchains. |
static void |
npSwapchains(long struct,
java.nio.LongBuffer value)
Unsafe version of
pSwapchains. |
static java.nio.LongBuffer |
npWaitSemaphores(long struct)
Unsafe version of
pWaitSemaphores. |
static void |
npWaitSemaphores(long struct,
java.nio.LongBuffer value)
Unsafe version of
pWaitSemaphores. |
static int |
nsType(long struct)
Unsafe version of
sType(). |
static void |
nsType(long struct,
int value)
Unsafe version of
sType. |
static int |
nswapchainCount(long struct)
Unsafe version of
swapchainCount(). |
static void |
nswapchainCount(long struct,
int value)
Sets the specified value to the
swapchainCount field of the specified struct. |
static int |
nwaitSemaphoreCount(long struct)
Unsafe version of
waitSemaphoreCount(). |
static void |
nwaitSemaphoreCount(long struct,
int value)
Sets the specified value to the
waitSemaphoreCount field of the specified struct. |
java.nio.IntBuffer |
pImageIndices()
Returns a
IntBuffer view of the data pointed to by the pImageIndices field. |
VkPresentInfoKHR |
pImageIndices(java.nio.IntBuffer value)
Sets the address of the specified
IntBuffer to the pImageIndices field. |
long |
pNext()
Returns the value of the
pNext field. |
VkPresentInfoKHR |
pNext(long value)
Sets the specified value to the
pNext field. |
java.nio.IntBuffer |
pResults()
Returns a
IntBuffer view of the data pointed to by the pResults field. |
VkPresentInfoKHR |
pResults(java.nio.IntBuffer value)
Sets the address of the specified
IntBuffer to the pResults field. |
java.nio.LongBuffer |
pSwapchains()
Returns a
LongBuffer view of the data pointed to by the pSwapchains field. |
VkPresentInfoKHR |
pSwapchains(java.nio.LongBuffer value)
Sets the address of the specified
LongBuffer to the pSwapchains field. |
java.nio.LongBuffer |
pWaitSemaphores()
Returns a
LongBuffer view of the data pointed to by the pWaitSemaphores field. |
VkPresentInfoKHR |
pWaitSemaphores(java.nio.LongBuffer value)
Sets the address of the specified
LongBuffer to the pWaitSemaphores field. |
VkPresentInfoKHR |
set(int sType,
long pNext,
java.nio.LongBuffer pWaitSemaphores,
int swapchainCount,
java.nio.LongBuffer pSwapchains,
java.nio.IntBuffer pImageIndices,
java.nio.IntBuffer pResults)
Initializes this struct with the specified values.
|
VkPresentInfoKHR |
set(VkPresentInfoKHR src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkPresentInfoKHR |
sType(int value)
Sets the specified value to the
sType field. |
int |
swapchainCount()
Returns the value of the
swapchainCount field. |
VkPresentInfoKHR |
swapchainCount(int value)
Sets the specified value to the
swapchainCount field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
int |
waitSemaphoreCount()
Returns the value of the
waitSemaphoreCount field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STYPE
public static final int PNEXT
public static final int WAITSEMAPHORECOUNT
public static final int PWAITSEMAPHORES
public static final int SWAPCHAINCOUNT
public static final int PSWAPCHAINS
public static final int PIMAGEINDICES
public static final int PRESULTS
public VkPresentInfoKHR(java.nio.ByteBuffer container)
VkPresentInfoKHR instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be
visible to the struct instance and vice versa.
The created instance holds a strong reference to the container object.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int sType()
sType field.public long pNext()
pNext field.public int waitSemaphoreCount()
waitSemaphoreCount field.@Nullable public java.nio.LongBuffer pWaitSemaphores()
LongBuffer view of the data pointed to by the pWaitSemaphores field.public int swapchainCount()
swapchainCount field.public java.nio.LongBuffer pSwapchains()
LongBuffer view of the data pointed to by the pSwapchains field.public java.nio.IntBuffer pImageIndices()
IntBuffer view of the data pointed to by the pImageIndices field.@Nullable public java.nio.IntBuffer pResults()
IntBuffer view of the data pointed to by the pResults field.public VkPresentInfoKHR sType(int value)
sType field.public VkPresentInfoKHR pNext(long value)
pNext field.public VkPresentInfoKHR pWaitSemaphores(@Nullable java.nio.LongBuffer value)
LongBuffer to the pWaitSemaphores field.public VkPresentInfoKHR swapchainCount(int value)
swapchainCount field.public VkPresentInfoKHR pSwapchains(java.nio.LongBuffer value)
LongBuffer to the pSwapchains field.public VkPresentInfoKHR pImageIndices(java.nio.IntBuffer value)
IntBuffer to the pImageIndices field.public VkPresentInfoKHR pResults(@Nullable java.nio.IntBuffer value)
IntBuffer to the pResults field.public VkPresentInfoKHR set(int sType, long pNext, @Nullable java.nio.LongBuffer pWaitSemaphores, int swapchainCount, java.nio.LongBuffer pSwapchains, java.nio.IntBuffer pImageIndices, @Nullable java.nio.IntBuffer pResults)
public VkPresentInfoKHR set(VkPresentInfoKHR src)
src - the source structpublic static VkPresentInfoKHR malloc()
VkPresentInfoKHR instance allocated with memAlloc. The instance must be explicitly freed.public static VkPresentInfoKHR calloc()
VkPresentInfoKHR instance allocated with memCalloc. The instance must be explicitly freed.public static VkPresentInfoKHR create()
VkPresentInfoKHR instance allocated with BufferUtils.public static VkPresentInfoKHR create(long address)
VkPresentInfoKHR instance for the specified memory address.@Nullable public static VkPresentInfoKHR createSafe(long address)
public static VkPresentInfoKHR.Buffer malloc(int capacity)
VkPresentInfoKHR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkPresentInfoKHR.Buffer calloc(int capacity)
VkPresentInfoKHR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkPresentInfoKHR.Buffer create(int capacity)
VkPresentInfoKHR.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkPresentInfoKHR.Buffer create(long address, int capacity)
VkPresentInfoKHR.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkPresentInfoKHR.Buffer createSafe(long address, int capacity)
public static VkPresentInfoKHR mallocStack()
VkPresentInfoKHR instance allocated on the thread-local MemoryStack.public static VkPresentInfoKHR callocStack()
VkPresentInfoKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkPresentInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
VkPresentInfoKHR instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkPresentInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
VkPresentInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkPresentInfoKHR.Buffer mallocStack(int capacity)
VkPresentInfoKHR.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkPresentInfoKHR.Buffer callocStack(int capacity)
VkPresentInfoKHR.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkPresentInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkPresentInfoKHR.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkPresentInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkPresentInfoKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nsType(long struct)
sType().public static long npNext(long struct)
pNext().public static int nwaitSemaphoreCount(long struct)
waitSemaphoreCount().@Nullable public static java.nio.LongBuffer npWaitSemaphores(long struct)
pWaitSemaphores.public static int nswapchainCount(long struct)
swapchainCount().public static java.nio.LongBuffer npSwapchains(long struct)
pSwapchains.public static java.nio.IntBuffer npImageIndices(long struct)
pImageIndices.@Nullable public static java.nio.IntBuffer npResults(long struct)
pResults.public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.public static void nwaitSemaphoreCount(long struct,
int value)
waitSemaphoreCount field of the specified struct.public static void npWaitSemaphores(long struct,
@Nullable
java.nio.LongBuffer value)
pWaitSemaphores.public static void nswapchainCount(long struct,
int value)
swapchainCount field of the specified struct.public static void npSwapchains(long struct,
java.nio.LongBuffer value)
pSwapchains.public static void npImageIndices(long struct,
java.nio.IntBuffer value)
pImageIndices.public static void npResults(long struct,
@Nullable
java.nio.IntBuffer value)
pResults.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.