Package org.lwjgl.vulkan
Class VkSwapchainPresentModeInfoEXT
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkSwapchainPresentModeInfoEXT>
org.lwjgl.vulkan.VkSwapchainPresentModeInfoEXT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkSwapchainPresentModeInfoEXT
extends org.lwjgl.system.Struct<VkSwapchainPresentModeInfoEXT>
implements org.lwjgl.system.NativeResource
Presentation modes for a vkQueuePresentKHR operation.
Description
If the pNext chain of VkPresentInfoKHR includes a VkSwapchainPresentModeInfoEXT structure, then that structure defines the presentation modes used for the current and subsequent presentation operations.
When the application changes present modes with VkSwapchainPresentModeInfoEXT, images that have already been queued for presentation will continue to be presented according to the previous present mode. The current image being queued for presentation and subsequent images will be presented according to the new present mode. The behavior during the transition between the two modes is defined as follows.
- Transition from
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRtoPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR: the presentation engine updates the shared presentable image according to the behavior ofPRESENT_MODE_SHARED_DEMAND_REFRESH_KHR. - Transition from
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHRtoPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR: the presentation engine may update the shared presentable image or defer that to its regular refresh cycle, according to the behavior ofPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR. - Transition between
PRESENT_MODE_FIFO_KHRandPRESENT_MODE_FIFO_RELAXED_KHR: Images continue to be appended to the same FIFO queue, and the behavior with respect to waiting for vertical blanking period will follow the new mode for current and subsequent images. - Transition from
PRESENT_MODE_IMMEDIATE_KHRtoPRESENT_MODE_FIFO_KHRorPRESENT_MODE_FIFO_RELAXED_KHRorPRESENT_MODE_FIFO_LATEST_READY_EXT: As all prior present requests in thePRESENT_MODE_IMMEDIATE_KHRmode are applied immediately, there are no outstanding present operations in this mode, and current and subsequent images are appended to the FIFO queue and presented according to the new mode. - Transition from
PRESENT_MODE_MAILBOX_KHRtoPRESENT_MODE_FIFO_KHRorPRESENT_MODE_FIFO_RELAXED_KHRorPRESENT_MODE_FIFO_LATEST_READY_EXT: Presentation in FIFO modes require waiting for the next vertical blanking period, withPRESENT_MODE_MAILBOX_KHRallowing the pending present operation to be replaced by a new one. In this case, the current present operation will replace the pending present operation and is applied according to the new mode. - Transition from
PRESENT_MODE_FIFO_KHRorPRESENT_MODE_FIFO_RELAXED_KHRorPRESENT_MODE_FIFO_LATEST_READY_EXTtoPRESENT_MODE_IMMEDIATE_KHRorPRESENT_MODE_MAILBOX_KHR: If the FIFO queue is empty, presentation is done according to the behavior of the new mode. If there are present operations in the FIFO queue, once the last present operation is performed based on the respective vertical blanking period, the current and subsequent updates are applied according to the new mode. - Transition between
PRESENT_MODE_FIFO_KHRorPRESENT_MODE_FIFO_RELAXED_KHR, andPRESENT_MODE_FIFO_LATEST_READY_EXT: Images continue to be appended to the same FIFO queue, and the behavior with respect to waiting for vertical blanking period and dequeuing requests will follow the new mode for current and subsequent images. - The behavior during transition between any other present modes, if possible, is implementation defined.
Valid Usage
swapchainCountmust be equal toVkPresentInfoKHR::swapchainCount- Each entry in
pPresentModesmust be a presentation mode specified inVkSwapchainPresentModesCreateInfoEXT::pPresentModeswhen creating the entry’s corresponding swapchain
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXTpPresentModesmust be a valid pointer to an array ofswapchainCountvalidVkPresentModeKHRvaluesswapchainCountmust be greater than 0
Layout
struct VkSwapchainPresentModeInfoEXT {
VkStructureType sType();
void const * pNext();
uint32_t swapchainCount();
VkPresentModeKHR const * pPresentModes();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkSwapchainPresentModeInfoEXT(ByteBuffer container) Creates aVkSwapchainPresentModeInfoEXTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioncalloc()Returns a newVkSwapchainPresentModeInfoEXTinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentModeInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.create()Returns a newVkSwapchainPresentModeInfoEXTinstance allocated withBufferUtils.create(int capacity) Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated withBufferUtils.create(long address) Returns a newVkSwapchainPresentModeInfoEXTinstance for the specified memory address.create(long address, int capacity) Create aVkSwapchainPresentModeInfoEXT.Bufferinstance at the specified memory.static @Nullable VkSwapchainPresentModeInfoEXTcreateSafe(long address) static @Nullable VkSwapchainPresentModeInfoEXT.BuffercreateSafe(long address, int capacity) malloc()Returns a newVkSwapchainPresentModeInfoEXTinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentModeInfoEXTinstance allocated on the specifiedMemoryStack.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static IntBuffernpPresentModes(long struct) Unsafe version ofpPresentModes.static voidnpPresentModes(long struct, IntBuffer value) Unsafe version ofpPresentModes.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.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.a list of presentation modes withswapchainCountentries.pPresentModes(IntBuffer value) Sets the address of the specifiedIntBufferto thepPresentModes()field.Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXTvalue to thesType()field.intthe number of swapchains being presented to by this command.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
SWAPCHAINCOUNT
public static final int SWAPCHAINCOUNTThe struct member offsets. -
PPRESENTMODES
public static final int PPRESENTMODESThe struct member offsets.
-
-
Constructor Details
-
VkSwapchainPresentModeInfoEXT
Creates aVkSwapchainPresentModeInfoEXTinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkSwapchainPresentModeInfoEXT>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
swapchainCount
public int swapchainCount()the number of swapchains being presented to by this command. -
pPresentModes
a list of presentation modes withswapchainCountentries. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXTvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pPresentModes
Sets the address of the specifiedIntBufferto thepPresentModes()field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkSwapchainPresentModeInfoEXTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkSwapchainPresentModeInfoEXTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkSwapchainPresentModeInfoEXTinstance allocated withBufferUtils. -
create
Returns a newVkSwapchainPresentModeInfoEXTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkSwapchainPresentModeInfoEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkSwapchainPresentModeInfoEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkSwapchainPresentModeInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkSwapchainPresentModeInfoEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkSwapchainPresentModeInfoEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSwapchainPresentModeInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nswapchainCount
public static int nswapchainCount(long struct) Unsafe version ofswapchainCount(). -
npPresentModes
Unsafe version ofpPresentModes. -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nswapchainCount
public static void nswapchainCount(long struct, int value) Sets the specified value to theswapchainCountfield of the specifiedstruct. -
npPresentModes
Unsafe version ofpPresentModes. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-