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.NativeResourceStructure 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_KHRlayout, or for a shared presentable image theIMAGE_LAYOUT_SHARED_PRESENT_KHRlayout.Note
When transitioning the image to
IMAGE_LAYOUT_SHARED_PRESENT_KHRorIMAGE_LAYOUT_PRESENT_SRC_KHR, there is no need to delay subsequent processing, or perform any visibility operations (asQueuePresentKHRperforms automatic visibility operations). To achieve this, thedstAccessMaskmember of theVkImageMemoryBarriershould be set to 0, and thedstStageMaskparameter should be set toPIPELINE_STAGE_BOTTOM_OF_PIPE_BIT.Valid Usage
- Each element of
pImageIndicesmust be the index of a presentable image acquired from the swapchain specified by the corresponding element of thepSwapchainsarray, and the presented image subresource must be in theIMAGE_LAYOUT_PRESENT_SRC_KHRorIMAGE_LAYOUT_SHARED_PRESENT_KHRlayout at the time the operation is executed on aVkDevice
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_PRESENT_INFO_KHR- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDeviceGroupPresentInfoKHR,VkDisplayPresentInfoKHR,VkPresentRegionsKHR, orVkPresentTimesInfoGOOGLE - Each
sTypemember in thepNextchain must be unique - If
waitSemaphoreCountis not 0,pWaitSemaphoresmust be a valid pointer to an array ofwaitSemaphoreCountvalidVkSemaphorehandles pSwapchainsmust be a valid pointer to an array ofswapchainCountvalidVkSwapchainKHRhandlespImageIndicesmust be a valid pointer to an array ofswapchainCountuint32_tvalues- If
pResultsis notNULL,pResultsmust be a valid pointer to an array ofswapchainCountVkResultvalues swapchainCountmust be greater than 0- Both of the elements of
pSwapchains, and the elements ofpWaitSemaphoresthat are valid handles must have been created, allocated, or retrieved from the sameVkInstance
See Also
Member documentation
sType– the type of this structure.pNext–NULLor 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 ofVkSemaphoreobjects withwaitSemaphoreCountentries, 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 ofVkSwapchainKHRobjects withswapchainCountentries. 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, withswapchainCountentries. Each entry in this array identifies the image to present on the corresponding entry in thepSwapchainsarray.pResults– an array ofVkResulttyped elements withswapchainCountentries. Applications that do not need per-swapchain results can useNULLforpResults. If non-NULL, each entry inpResultswill be set to theVkResultfor 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 classVkPresentInfoKHR.BufferAn array ofVkPresentInfoKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intPIMAGEINDICES
PNEXT
PRESULTS
PSWAPCHAINS
PWAITSEMAPHORESThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
SWAPCHAINCOUNT
WAITSEMAPHORECOUNTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkPresentInfoKHR(java.nio.ByteBuffer container)Creates aVkPresentInfoKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkPresentInfoKHRcalloc()Returns a newVkPresentInfoKHRinstance allocated withmemCalloc.static VkPresentInfoKHR.Buffercalloc(int capacity)Returns a newVkPresentInfoKHR.Bufferinstance allocated withmemCalloc.static VkPresentInfoKHRcallocStack()Returns a newVkPresentInfoKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPresentInfoKHR.BuffercallocStack(int capacity)Returns a newVkPresentInfoKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPresentInfoKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPresentInfoKHRcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPresentInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPresentInfoKHRcreate()Returns a newVkPresentInfoKHRinstance allocated withBufferUtils.static VkPresentInfoKHR.Buffercreate(int capacity)Returns a newVkPresentInfoKHR.Bufferinstance allocated withBufferUtils.static VkPresentInfoKHRcreate(long address)Returns a newVkPresentInfoKHRinstance for the specified memory address.static VkPresentInfoKHR.Buffercreate(long address, int capacity)Create aVkPresentInfoKHR.Bufferinstance at the specified memory.static VkPresentInfoKHRcreateSafe(long address)static VkPresentInfoKHR.BuffercreateSafe(long address, int capacity)static VkPresentInfoKHRmalloc()Returns a newVkPresentInfoKHRinstance allocated withmemAlloc.static VkPresentInfoKHR.Buffermalloc(int capacity)Returns a newVkPresentInfoKHR.Bufferinstance allocated withmemAlloc.static VkPresentInfoKHRmallocStack()Returns a newVkPresentInfoKHRinstance allocated on the thread-localMemoryStack.static VkPresentInfoKHR.BuffermallocStack(int capacity)Returns a newVkPresentInfoKHR.Bufferinstance allocated on the thread-localMemoryStack.static VkPresentInfoKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkPresentInfoKHRmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPresentInfoKHRinstance allocated on the specifiedMemoryStack.static java.nio.IntBuffernpImageIndices(long struct)Unsafe version ofpImageIndices.static voidnpImageIndices(long struct, java.nio.IntBuffer value)Unsafe version ofpImageIndices.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static java.nio.IntBuffernpResults(long struct)Unsafe version ofpResults.static voidnpResults(long struct, java.nio.IntBuffer value)Unsafe version ofpResults.static java.nio.LongBuffernpSwapchains(long struct)Unsafe version ofpSwapchains.static voidnpSwapchains(long struct, java.nio.LongBuffer value)Unsafe version ofpSwapchains.static java.nio.LongBuffernpWaitSemaphores(long struct)Unsafe version ofpWaitSemaphores.static voidnpWaitSemaphores(long struct, java.nio.LongBuffer value)Unsafe version ofpWaitSemaphores.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.static intnswapchainCount(long struct)Unsafe version ofswapchainCount().static voidnswapchainCount(long struct, int value)Sets the specified value to theswapchainCountfield of the specifiedstruct.static intnwaitSemaphoreCount(long struct)Unsafe version ofwaitSemaphoreCount().static voidnwaitSemaphoreCount(long struct, int value)Sets the specified value to thewaitSemaphoreCountfield of the specifiedstruct.java.nio.IntBufferpImageIndices()Returns aIntBufferview of the data pointed to by thepImageIndicesfield.VkPresentInfoKHRpImageIndices(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto thepImageIndicesfield.longpNext()Returns the value of thepNextfield.VkPresentInfoKHRpNext(long value)Sets the specified value to thepNextfield.java.nio.IntBufferpResults()Returns aIntBufferview of the data pointed to by thepResultsfield.VkPresentInfoKHRpResults(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto thepResultsfield.java.nio.LongBufferpSwapchains()Returns aLongBufferview of the data pointed to by thepSwapchainsfield.VkPresentInfoKHRpSwapchains(java.nio.LongBuffer value)Sets the address of the specifiedLongBufferto thepSwapchainsfield.java.nio.LongBufferpWaitSemaphores()Returns aLongBufferview of the data pointed to by thepWaitSemaphoresfield.VkPresentInfoKHRpWaitSemaphores(java.nio.LongBuffer value)Sets the address of the specifiedLongBufferto thepWaitSemaphoresfield.VkPresentInfoKHRset(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.VkPresentInfoKHRset(VkPresentInfoKHR src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkPresentInfoKHRsType(int value)Sets the specified value to thesTypefield.intswapchainCount()Returns the value of theswapchainCountfield.VkPresentInfoKHRswapchainCount(int value)Sets the specified value to theswapchainCountfield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.intwaitSemaphoreCount()Returns the value of thewaitSemaphoreCountfield.
-
-
-
Constructor Detail
-
VkPresentInfoKHR
public VkPresentInfoKHR(java.nio.ByteBuffer container)
Creates aVkPresentInfoKHRinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
waitSemaphoreCount
public int waitSemaphoreCount()
Returns the value of thewaitSemaphoreCountfield.
-
pWaitSemaphores
@Nullable public java.nio.LongBuffer pWaitSemaphores()
Returns aLongBufferview of the data pointed to by thepWaitSemaphoresfield.
-
swapchainCount
public int swapchainCount()
Returns the value of theswapchainCountfield.
-
pSwapchains
public java.nio.LongBuffer pSwapchains()
Returns aLongBufferview of the data pointed to by thepSwapchainsfield.
-
pImageIndices
public java.nio.IntBuffer pImageIndices()
Returns aIntBufferview of the data pointed to by thepImageIndicesfield.
-
pResults
@Nullable public java.nio.IntBuffer pResults()
Returns aIntBufferview of the data pointed to by thepResultsfield.
-
sType
public VkPresentInfoKHR sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkPresentInfoKHR pNext(long value)
Sets the specified value to thepNextfield.
-
pWaitSemaphores
public VkPresentInfoKHR pWaitSemaphores(@Nullable java.nio.LongBuffer value)
Sets the address of the specifiedLongBufferto thepWaitSemaphoresfield.
-
swapchainCount
public VkPresentInfoKHR swapchainCount(int value)
Sets the specified value to theswapchainCountfield.
-
pSwapchains
public VkPresentInfoKHR pSwapchains(java.nio.LongBuffer value)
Sets the address of the specifiedLongBufferto thepSwapchainsfield.
-
pImageIndices
public VkPresentInfoKHR pImageIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto thepImageIndicesfield.
-
pResults
public VkPresentInfoKHR pResults(@Nullable java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto thepResultsfield.
-
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 newVkPresentInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkPresentInfoKHR calloc()
Returns a newVkPresentInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkPresentInfoKHR create()
Returns a newVkPresentInfoKHRinstance allocated withBufferUtils.
-
create
public static VkPresentInfoKHR create(long address)
Returns a newVkPresentInfoKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkPresentInfoKHR createSafe(long address)
-
malloc
public static VkPresentInfoKHR.Buffer malloc(int capacity)
Returns a newVkPresentInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkPresentInfoKHR.Buffer calloc(int capacity)
Returns a newVkPresentInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkPresentInfoKHR.Buffer create(int capacity)
Returns a newVkPresentInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkPresentInfoKHR.Buffer create(long address, int capacity)
Create aVkPresentInfoKHR.Bufferinstance 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 newVkPresentInfoKHRinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkPresentInfoKHR callocStack()
Returns a newVkPresentInfoKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkPresentInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkPresentInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPresentInfoKHRinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkPresentInfoKHR.Buffer callocStack(int capacity)
Returns a newVkPresentInfoKHR.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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 thewaitSemaphoreCountfield 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 theswapchainCountfield 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
-
-