Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkPresentIdKHR

extends Struct<VkPresentIdKHR>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

The list of presentation identifiers.
Description

For applications to be able to reference specific presentation events queued by a call to vkQueuePresentKHR, an identifier needs to be associated with them. When the presentId feature is enabled, applications can include the VkPresentIdKHR structure in the pNext chain of the VkPresentInfoKHR structure to supply identifiers.

Each VkSwapchainKHR has a presentId associated with it. This value is initially set to zero when the VkSwapchainKHR is created.

When a VkPresentIdKHR structure with a non-NULL pPresentIds is included in the pNext chain of a VkPresentInfoKHR structure, each pSwapchains entry has a presentId associated in the pPresentIds array at the same index as the swapchain in the pSwapchains array. If this presentId is non-zero, then the application can later use this value to refer to that image presentation. A value of zero indicates that this presentation has no associated presentId. A non-zero presentId must be greater than any non-zero presentId passed previously by the application for the same swapchain.

There is no requirement for any precise timing relationship between the presentation of the image to the user and the update of the presentId value, but implementations should make this as close as possible to the presentation of the first pixel in the new image to the user.

Valid Usage
Valid Usage (Implicit)

Layout


struct VkPresentIdKHR {
    VkStructureType sType;
    void const * pNext;
    uint32_t swapchainCount;
    uint64_t const * pPresentIds;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
PNEXT

The struct member offsets.

public static final int
PPRESENTIDS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STYPE

The struct member offsets.

public static final int
SWAPCHAINCOUNT

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkPresentIdKHR(long address, ByteBuffer container)

public
VkPresentIdKHR(ByteBuffer container)

Creates a VkPresentIdKHR instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkPresentIdKHR
calloc()

Returns a new VkPresentIdKHR instance allocated with memCalloc.

public static VkPresentIdKHR.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkPresentIdKHR.Buffer instance allocated with memCalloc.

public static VkPresentIdKHR
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkPresentIdKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkPresentIdKHR.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkPresentIdKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected VkPresentIdKHR
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkPresentIdKHR
create()

Returns a new VkPresentIdKHR instance allocated with BufferUtils.

public static VkPresentIdKHR
create(long address)

Returns a new VkPresentIdKHR instance for the specified memory address.

public static VkPresentIdKHR.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkPresentIdKHR.Buffer instance allocated with BufferUtils.

public static VkPresentIdKHR.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkPresentIdKHR.Buffer instance at the specified memory.

public static VkPresentIdKHR
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkPresentIdKHR.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public static VkPresentIdKHR
malloc()

Returns a new VkPresentIdKHR instance allocated with memAlloc.

public static VkPresentIdKHR.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkPresentIdKHR.Buffer instance allocated with memAlloc.

public static VkPresentIdKHR
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkPresentIdKHR instance allocated on the specified MemoryStack.

public static VkPresentIdKHR.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkPresentIdKHR.Buffer instance allocated on the specified MemoryStack.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static LongBuffer
npPresentIds(long struct)

Unsafe version of pPresentIds.

public static void
npPresentIds(long struct, LongBuffer value)

Unsafe version of pPresentIds.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public static int
nswapchainCount(long struct)

Unsafe version of swapchainCount.

public static void
nswapchainCount(long struct, int value)

Sets the specified value to the swapchainCount field of the specified struct.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkPresentIdKHR
pNext(long value)

Sets the specified value to the pNext field.

public LongBuffer
pPresentIds()

NULL or a pointer to an array of uint64_t with swapchainCount entries.

public VkPresentIdKHR
pPresentIds(LongBuffer value)

Sets the address of the specified LongBuffer to the pPresentIds field.

public VkPresentIdKHR
set(int sType, long pNext, int swapchainCount, LongBuffer pPresentIds)

Initializes this struct with the specified values.

public VkPresentIdKHR

Returns:

this struct
set
(VkPresentIdKHR
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
sType()

a VkStructureType value identifying this structure.

public VkPresentIdKHR
sType(int value)

Sets the specified value to the sType field.

public VkPresentIdKHR
sType$Default()

Sets the STRUCTURE_TYPE_PRESENT_ID_KHR value to the sType field.

public int
swapchainCount()

the number of swapchains being presented to the vkQueuePresentKHR command.

public VkPresentIdKHR
swapchainCount(int value)

Sets the specified value to the swapchainCount field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

PNEXTback to summary
public static final int PNEXT

The struct member offsets.

PPRESENTIDSback to summary
public static final int PPRESENTIDS

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

STYPEback to summary
public static final int STYPE

The struct member offsets.

SWAPCHAINCOUNTback to summary
public static final int SWAPCHAINCOUNT

The struct member offsets.

Constructor Detail

VkPresentIdKHRback to summary
protected VkPresentIdKHR(long address, ByteBuffer container)
VkPresentIdKHRback to summary
public VkPresentIdKHR(ByteBuffer container)

Creates a VkPresentIdKHR 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.

Method Detail

callocback to summary
public static VkPresentIdKHR calloc()

Returns a new VkPresentIdKHR instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static VkPresentIdKHR.Buffer calloc(int capacity)

Returns a new VkPresentIdKHR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static VkPresentIdKHR calloc(MemoryStack stack)

Returns a new VkPresentIdKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static VkPresentIdKHR.Buffer calloc(int capacity, MemoryStack stack)

Returns a new VkPresentIdKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected VkPresentIdKHR create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static VkPresentIdKHR create()

Returns a new VkPresentIdKHR instance allocated with BufferUtils.

createback to summary
public static VkPresentIdKHR create(long address)

Returns a new VkPresentIdKHR instance for the specified memory address.

createback to summary
public static VkPresentIdKHR.Buffer create(int capacity)

Returns a new VkPresentIdKHR.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static VkPresentIdKHR.Buffer create(long address, int capacity)

Create a VkPresentIdKHR.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static VkPresentIdKHR createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static VkPresentIdKHR.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static VkPresentIdKHR malloc()

Returns a new VkPresentIdKHR instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static VkPresentIdKHR.Buffer malloc(int capacity)

Returns a new VkPresentIdKHR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static VkPresentIdKHR malloc(MemoryStack stack)

Returns a new VkPresentIdKHR instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static VkPresentIdKHR.Buffer malloc(int capacity, MemoryStack stack)

Returns a new VkPresentIdKHR.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

npNextback to summary
public static long npNext(long struct)

Unsafe version of pNext.

npNextback to summary
public static void npNext(long struct, long value)

Unsafe version of pNext.

npPresentIdsback to summary
public static LongBuffer npPresentIds(long struct)

Unsafe version of pPresentIds.

Annotations
@Nullable
npPresentIdsback to summary
public static void npPresentIds(long struct, LongBuffer value)

Unsafe version of pPresentIds.

nsTypeback to summary
public static int nsType(long struct)

Unsafe version of sType.

nsTypeback to summary
public static void nsType(long struct, int value)

Unsafe version of sType.

nswapchainCountback to summary
public static int nswapchainCount(long struct)

Unsafe version of swapchainCount.

nswapchainCountback to summary
public static void nswapchainCount(long struct, int value)

Sets the specified value to the swapchainCount field of the specified struct.

pNextback to summary
public long pNext()

NULL or a pointer to a structure extending this structure.

Annotations
@NativeType:void const *
pNextback to summary
public VkPresentIdKHR pNext(long value)

Sets the specified value to the pNext field.

pPresentIdsback to summary
public LongBuffer pPresentIds()

NULL or a pointer to an array of uint64_t with swapchainCount entries. If not NULL, each non-zero value in pPresentIds specifies the present id to be associated with the presentation of the swapchain with the same index in the QueuePresentKHR call.

Annotations
@Nullable
@NativeType:uint64_t const *
pPresentIdsback to summary
public VkPresentIdKHR pPresentIds(LongBuffer value)

Sets the address of the specified LongBuffer to the pPresentIds field.

setback to summary
public VkPresentIdKHR set(int sType, long pNext, int swapchainCount, LongBuffer pPresentIds)

Initializes this struct with the specified values.

setback to summary
public VkPresentIdKHR set(VkPresentIdKHR src)

Copies the specified struct data to this struct.

Parameters
src:VkPresentIdKHR

the source struct

Returns:VkPresentIdKHR

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
sTypeback to summary
public int sType()

a VkStructureType value identifying this structure.

Annotations
@NativeType:VkStructureType
sTypeback to summary
public VkPresentIdKHR sType(int value)

Sets the specified value to the sType field.

sType$Defaultback to summary
public VkPresentIdKHR sType$Default()

Sets the STRUCTURE_TYPE_PRESENT_ID_KHR value to the sType field.

swapchainCountback to summary
public int swapchainCount()

the number of swapchains being presented to the vkQueuePresentKHR command.

Annotations
@NativeType:uint32_t
swapchainCountback to summary
public VkPresentIdKHR swapchainCount(int value)

Sets the specified value to the swapchainCount field.

org.lwjgl.vulkan back to summary

public Class VkPresentIdKHR.Buffer

extends StructBuffer<VkPresentIdKHR, VkPresentIdKHR.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of VkPresentIdKHR structs.

Field Summary

Modifier and TypeField and Description
private static final VkPresentIdKHR

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new VkPresentIdKHR.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
protected VkPresentIdKHR
public long

Returns:

the value of the VkPresentIdKHR#pNext field.
pNext
()

public VkPresentIdKHR.Buffer
pNext(long value)

Sets the specified value to the VkPresentIdKHR#pNext field.

public LongBuffer

Returns:

a LongBuffer view of the data pointed to by the VkPresentIdKHR#pPresentIds field.
pPresentIds
()

public VkPresentIdKHR.Buffer
pPresentIds(LongBuffer value)

Sets the address of the specified LongBuffer to the VkPresentIdKHR#pPresentIds field.

protected VkPresentIdKHR.Buffer
public int

Returns:

the value of the VkPresentIdKHR#sType field.
sType
()

public VkPresentIdKHR.Buffer
sType(int value)

Sets the specified value to the VkPresentIdKHR#sType field.

public VkPresentIdKHR.Buffer
public int

Returns:

the value of the VkPresentIdKHR#swapchainCount field.
swapchainCount
()

public VkPresentIdKHR.Buffer
swapchainCount(int value)

Sets the specified value to the VkPresentIdKHR#swapchainCount field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final VkPresentIdKHR ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new VkPresentIdKHR.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by VkPresentIdKHR#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

getElementFactoryback to summary
protected VkPresentIdKHR getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
pNextback to summary
public long pNext()
Returns:long

the value of the VkPresentIdKHR#pNext field.

Annotations
@NativeType:void const *
pNextback to summary
public VkPresentIdKHR.Buffer pNext(long value)

Sets the specified value to the VkPresentIdKHR#pNext field.

pPresentIdsback to summary
public LongBuffer pPresentIds()
Returns:LongBuffer

a LongBuffer view of the data pointed to by the VkPresentIdKHR#pPresentIds field.

Annotations
@Nullable
@NativeType:uint64_t const *
pPresentIdsback to summary
public VkPresentIdKHR.Buffer pPresentIds(LongBuffer value)

Sets the address of the specified LongBuffer to the VkPresentIdKHR#pPresentIds field.

selfback to summary
protected VkPresentIdKHR.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
sTypeback to summary
public int sType()
Returns:int

the value of the VkPresentIdKHR#sType field.

Annotations
@NativeType:VkStructureType
sTypeback to summary
public VkPresentIdKHR.Buffer sType(int value)

Sets the specified value to the VkPresentIdKHR#sType field.

sType$Defaultback to summary
public VkPresentIdKHR.Buffer sType$Default()

Sets the STRUCTURE_TYPE_PRESENT_ID_KHR value to the VkPresentIdKHR#sType field.

swapchainCountback to summary
public int swapchainCount()
Returns:int

the value of the VkPresentIdKHR#swapchainCount field.

Annotations
@NativeType:uint32_t
swapchainCountback to summary
public VkPresentIdKHR.Buffer swapchainCount(int value)

Sets the specified value to the VkPresentIdKHR#swapchainCount field.