Package org.lwjgl.vulkan
Class VkPresentInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkPresentInfoKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkPresentInfoKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure describing parameters of a queue presentation.Description
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 theIMAGE_LAYOUT_SHARED_PRESENT_KHR
layout.Note
When transitioning the image to
IMAGE_LAYOUT_SHARED_PRESENT_KHR
orIMAGE_LAYOUT_PRESENT_SRC_KHR
, there is no need to delay subsequent processing, or perform any visibility operations (asQueuePresentKHR
performs automatic visibility operations). To achieve this, thedstAccessMask
member of theVkImageMemoryBarrier
should be set to 0, and thedstStageMask
parameter should be set toPIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
.Valid Usage
- Each element of
pImageIndices
must be the index of a presentable image acquired from the swapchain specified by the corresponding element of thepSwapchains
array, and the presented image subresource must be in theIMAGE_LAYOUT_PRESENT_SRC_KHR
orIMAGE_LAYOUT_SHARED_PRESENT_KHR
layout at the time the operation is executed on aVkDevice
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_PRESENT_INFO_KHR
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDeviceGroupPresentInfoKHR
,VkDisplayPresentInfoKHR
,VkPresentRegionsKHR
, orVkPresentTimesInfoGOOGLE
- Each
sType
member in thepNext
chain must be unique - If
waitSemaphoreCount
is not 0,pWaitSemaphores
must be a valid pointer to an array ofwaitSemaphoreCount
validVkSemaphore
handles pSwapchains
must be a valid pointer to an array ofswapchainCount
validVkSwapchainKHR
handlespImageIndices
must be a valid pointer to an array ofswapchainCount
uint32_t
values- If
pResults
is notNULL
,pResults
must be a valid pointer to an array ofswapchainCount
VkResult
values swapchainCount
must be greater than 0- Both of the elements of
pSwapchains
, and the elements ofpWaitSemaphores
that are valid handles must have been created, allocated, or retrieved from the sameVkInstance
See Also
Member documentation
sType
– 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
– if notNULL
, is an array ofVkSemaphore
objects withwaitSemaphoreCount
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
– an array ofVkSwapchainKHR
objects withswapchainCount
entries. A given swapchain must not appear in this list more than once.pImageIndices
– an array of indices into the array of each swapchain’s presentable images, withswapchainCount
entries. Each entry in this array identifies the image to present on the corresponding entry in thepSwapchains
array.pResults
– an array ofVkResult
typed elements withswapchainCount
entries. Applications that do not need per-swapchain results can useNULL
forpResults
. If non-NULL
, each entry inpResults
will be set to theVkResult
for presenting the swapchain corresponding to the same index inpSwapchains
.
Layout
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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkPresentInfoKHR.Buffer
An array ofVkPresentInfoKHR
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
PIMAGEINDICES
PNEXT
PRESULTS
PSWAPCHAINS
PWAITSEMAPHORESThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
SWAPCHAINCOUNT
WAITSEMAPHORECOUNTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkPresentInfoKHR(java.nio.ByteBuffer container)
Creates aVkPresentInfoKHR
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkPresentInfoKHR
calloc()
Returns a newVkPresentInfoKHR
instance allocated withmemCalloc
.static VkPresentInfoKHR.Buffer
calloc(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated withmemCalloc
.static VkPresentInfoKHR
callocStack()
Returns a newVkPresentInfoKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPresentInfoKHR.Buffer
callocStack(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPresentInfoKHR.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPresentInfoKHR
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPresentInfoKHR
create()
Returns a newVkPresentInfoKHR
instance allocated withBufferUtils
.static VkPresentInfoKHR.Buffer
create(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated withBufferUtils
.static VkPresentInfoKHR
create(long address)
Returns a newVkPresentInfoKHR
instance for the specified memory address.static VkPresentInfoKHR.Buffer
create(long address, int capacity)
Create aVkPresentInfoKHR.Buffer
instance at the specified memory.static VkPresentInfoKHR
createSafe(long address)
static VkPresentInfoKHR.Buffer
createSafe(long address, int capacity)
static VkPresentInfoKHR
malloc()
Returns a newVkPresentInfoKHR
instance allocated withmemAlloc
.static VkPresentInfoKHR.Buffer
malloc(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated withmemAlloc
.static VkPresentInfoKHR
mallocStack()
Returns a newVkPresentInfoKHR
instance allocated on the thread-localMemoryStack
.static VkPresentInfoKHR.Buffer
mallocStack(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
.static VkPresentInfoKHR.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkPresentInfoKHR
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHR
instance allocated on the specifiedMemoryStack
.static java.nio.IntBuffer
npImageIndices(long struct)
Unsafe version ofpImageIndices
.static void
npImageIndices(long struct, java.nio.IntBuffer value)
Unsafe version ofpImageIndices
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static java.nio.IntBuffer
npResults(long struct)
Unsafe version ofpResults
.static void
npResults(long struct, java.nio.IntBuffer value)
Unsafe version ofpResults
.static java.nio.LongBuffer
npSwapchains(long struct)
Unsafe version ofpSwapchains
.static void
npSwapchains(long struct, java.nio.LongBuffer value)
Unsafe version ofpSwapchains
.static java.nio.LongBuffer
npWaitSemaphores(long struct)
Unsafe version ofpWaitSemaphores
.static void
npWaitSemaphores(long struct, java.nio.LongBuffer value)
Unsafe version ofpWaitSemaphores
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.static int
nswapchainCount(long struct)
Unsafe version ofswapchainCount()
.static void
nswapchainCount(long struct, int value)
Sets the specified value to theswapchainCount
field of the specifiedstruct
.static int
nwaitSemaphoreCount(long struct)
Unsafe version ofwaitSemaphoreCount()
.static void
nwaitSemaphoreCount(long struct, int value)
Sets the specified value to thewaitSemaphoreCount
field of the specifiedstruct
.java.nio.IntBuffer
pImageIndices()
Returns aIntBuffer
view of the data pointed to by thepImageIndices
field.VkPresentInfoKHR
pImageIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepImageIndices
field.long
pNext()
Returns the value of thepNext
field.VkPresentInfoKHR
pNext(long value)
Sets the specified value to thepNext
field.java.nio.IntBuffer
pResults()
Returns aIntBuffer
view of the data pointed to by thepResults
field.VkPresentInfoKHR
pResults(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepResults
field.java.nio.LongBuffer
pSwapchains()
Returns aLongBuffer
view of the data pointed to by thepSwapchains
field.VkPresentInfoKHR
pSwapchains(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepSwapchains
field.java.nio.LongBuffer
pWaitSemaphores()
Returns aLongBuffer
view of the data pointed to by thepWaitSemaphores
field.VkPresentInfoKHR
pWaitSemaphores(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepWaitSemaphores
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 thesType
field.VkPresentInfoKHR
sType(int value)
Sets the specified value to thesType
field.int
swapchainCount()
Returns the value of theswapchainCount
field.VkPresentInfoKHR
swapchainCount(int value)
Sets the specified value to theswapchainCount
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.int
waitSemaphoreCount()
Returns the value of thewaitSemaphoreCount
field.
-
-
-
Constructor Detail
-
VkPresentInfoKHR
public VkPresentInfoKHR(java.nio.ByteBuffer container)
Creates aVkPresentInfoKHR
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
waitSemaphoreCount
public int waitSemaphoreCount()
Returns the value of thewaitSemaphoreCount
field.
-
pWaitSemaphores
@Nullable public java.nio.LongBuffer pWaitSemaphores()
Returns aLongBuffer
view of the data pointed to by thepWaitSemaphores
field.
-
swapchainCount
public int swapchainCount()
Returns the value of theswapchainCount
field.
-
pSwapchains
public java.nio.LongBuffer pSwapchains()
Returns aLongBuffer
view of the data pointed to by thepSwapchains
field.
-
pImageIndices
public java.nio.IntBuffer pImageIndices()
Returns aIntBuffer
view of the data pointed to by thepImageIndices
field.
-
pResults
@Nullable public java.nio.IntBuffer pResults()
Returns aIntBuffer
view of the data pointed to by thepResults
field.
-
sType
public VkPresentInfoKHR sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkPresentInfoKHR pNext(long value)
Sets the specified value to thepNext
field.
-
pWaitSemaphores
public VkPresentInfoKHR pWaitSemaphores(@Nullable java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepWaitSemaphores
field.
-
swapchainCount
public VkPresentInfoKHR swapchainCount(int value)
Sets the specified value to theswapchainCount
field.
-
pSwapchains
public VkPresentInfoKHR pSwapchains(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepSwapchains
field.
-
pImageIndices
public VkPresentInfoKHR pImageIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepImageIndices
field.
-
pResults
public VkPresentInfoKHR pResults(@Nullable java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepResults
field.
-
set
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)
Initializes this struct with the specified values.
-
set
public VkPresentInfoKHR set(VkPresentInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkPresentInfoKHR malloc()
Returns a newVkPresentInfoKHR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkPresentInfoKHR calloc()
Returns a newVkPresentInfoKHR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkPresentInfoKHR create()
Returns a newVkPresentInfoKHR
instance allocated withBufferUtils
.
-
create
public static VkPresentInfoKHR create(long address)
Returns a newVkPresentInfoKHR
instance for the specified memory address.
-
createSafe
@Nullable public static VkPresentInfoKHR createSafe(long address)
-
malloc
public static VkPresentInfoKHR.Buffer malloc(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkPresentInfoKHR.Buffer calloc(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPresentInfoKHR.Buffer create(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPresentInfoKHR.Buffer create(long address, int capacity)
Create aVkPresentInfoKHR.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkPresentInfoKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkPresentInfoKHR mallocStack()
Returns a newVkPresentInfoKHR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkPresentInfoKHR callocStack()
Returns a newVkPresentInfoKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkPresentInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkPresentInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkPresentInfoKHR.Buffer mallocStack(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkPresentInfoKHR.Buffer callocStack(int capacity)
Returns a newVkPresentInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkPresentInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkPresentInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType()
.
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext()
.
-
nwaitSemaphoreCount
public static int nwaitSemaphoreCount(long struct)
Unsafe version ofwaitSemaphoreCount()
.
-
npWaitSemaphores
@Nullable public static java.nio.LongBuffer npWaitSemaphores(long struct)
Unsafe version ofpWaitSemaphores
.
-
nswapchainCount
public static int nswapchainCount(long struct)
Unsafe version ofswapchainCount()
.
-
npSwapchains
public static java.nio.LongBuffer npSwapchains(long struct)
Unsafe version ofpSwapchains
.
-
npImageIndices
public static java.nio.IntBuffer npImageIndices(long struct)
Unsafe version ofpImageIndices
.
-
npResults
@Nullable public static java.nio.IntBuffer npResults(long struct)
Unsafe version ofpResults
.
-
nsType
public static void nsType(long struct, int value)
Unsafe version ofsType
.
-
npNext
public static void npNext(long struct, long value)
Unsafe version ofpNext
.
-
nwaitSemaphoreCount
public static void nwaitSemaphoreCount(long struct, int value)
Sets the specified value to thewaitSemaphoreCount
field of the specifiedstruct
.
-
npWaitSemaphores
public static void npWaitSemaphores(long struct, @Nullable java.nio.LongBuffer value)
Unsafe version ofpWaitSemaphores
.
-
nswapchainCount
public static void nswapchainCount(long struct, int value)
Sets the specified value to theswapchainCount
field of the specifiedstruct
.
-
npSwapchains
public static void npSwapchains(long struct, java.nio.LongBuffer value)
Unsafe version ofpSwapchains
.
-
npImageIndices
public static void npImageIndices(long struct, java.nio.IntBuffer value)
Unsafe version ofpImageIndices
.
-
npResults
public static void npResults(long struct, @Nullable java.nio.IntBuffer value)
Unsafe version ofpResults
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-