Package org.lwjgl.vulkan
Class VkDisplayPresentInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDisplayPresentInfoKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkDisplayPresentInfoKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure describing parameters of a queue presentation to a swapchain.Description
If the extent of the
srcRectanddstRectare not equal, the presented pixels will be scaled accordingly.Valid Usage
srcRectmust specify a rectangular region that is a subset of the image being presenteddstRectmust specify a rectangular region that is a subset of thevisibleRegionparameter of the display mode the swapchain being presented uses- If the
persistentContentmember of theVkDisplayPropertiesKHRstructure returned byvkGetPhysicalDeviceDisplayPropertiesKHRfor the display the present operation targets thenpersistentmust beFALSE
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR
See Also
Member documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.srcRect– a rectangular region of pixels to present. It must be a subset of the image being presented. IfVkDisplayPresentInfoKHRis not specified, this region will be assumed to be the entire presentable image.dstRect– a rectangular region within the visible region of the swapchain’s display mode. IfVkDisplayPresentInfoKHRis not specified, this region will be assumed to be the entire visible region of the visible region of the swapchain’s mode. If the specified rectangle is a subset of the display mode’s visible region, content from display planes below the swapchain’s plane will be visible outside the rectangle. If there are no planes below the swapchain’s, the area outside the specified rectangle will be black. If portions of the specified rectangle are outside of the display’s visible region, pixels mapping only to those portions of the rectangle will be discarded.persistent– If this isTRUE, the display engine will enable buffered mode on displays that support it. This allows the display engine to stop sending content to the display until a new image is presented. The display will instead maintain a copy of the last presented image. This allows less power to be used, but may increase presentation latency. IfVkDisplayPresentInfoKHRis not specified, persistent mode will not be used.
Layout
struct VkDisplayPresentInfoKHR { VkStructureType sType; void const * pNext;VkRect2DsrcRect;VkRect2DdstRect; VkBool32 persistent; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkDisplayPresentInfoKHR.BufferAn array ofVkDisplayPresentInfoKHRstructs.
-
Constructor Summary
Constructors Constructor Description VkDisplayPresentInfoKHR(java.nio.ByteBuffer container)Creates aVkDisplayPresentInfoKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkDisplayPresentInfoKHRcalloc()Returns a newVkDisplayPresentInfoKHRinstance allocated withmemCalloc.static VkDisplayPresentInfoKHR.Buffercalloc(int capacity)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated withmemCalloc.static VkDisplayPresentInfoKHRcallocStack()Returns a newVkDisplayPresentInfoKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDisplayPresentInfoKHR.BuffercallocStack(int capacity)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDisplayPresentInfoKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayPresentInfoKHRcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayPresentInfoKHRcreate()Returns a newVkDisplayPresentInfoKHRinstance allocated withBufferUtils.static VkDisplayPresentInfoKHR.Buffercreate(int capacity)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated withBufferUtils.static VkDisplayPresentInfoKHRcreate(long address)Returns a newVkDisplayPresentInfoKHRinstance for the specified memory address.static VkDisplayPresentInfoKHR.Buffercreate(long address, int capacity)Create aVkDisplayPresentInfoKHR.Bufferinstance at the specified memory.static VkDisplayPresentInfoKHRcreateSafe(long address)static VkDisplayPresentInfoKHR.BuffercreateSafe(long address, int capacity)VkRect2DdstRect()Returns aVkRect2Dview of thedstRectfield.VkDisplayPresentInfoKHRdstRect(java.util.function.Consumer<VkRect2D> consumer)Passes thedstRectfield to the specifiedConsumer.VkDisplayPresentInfoKHRdstRect(VkRect2D value)Copies the specifiedVkRect2Dto thedstRectfield.static VkDisplayPresentInfoKHRmalloc()Returns a newVkDisplayPresentInfoKHRinstance allocated withmemAlloc.static VkDisplayPresentInfoKHR.Buffermalloc(int capacity)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated withmemAlloc.static VkDisplayPresentInfoKHRmallocStack()Returns a newVkDisplayPresentInfoKHRinstance allocated on the thread-localMemoryStack.static VkDisplayPresentInfoKHR.BuffermallocStack(int capacity)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the thread-localMemoryStack.static VkDisplayPresentInfoKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkDisplayPresentInfoKHRmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStack.static VkRect2DndstRect(long struct)Unsafe version ofdstRect().static voidndstRect(long struct, VkRect2D value)Unsafe version ofdstRect.static intnpersistent(long struct)Unsafe version ofpersistent().static voidnpersistent(long struct, int value)Unsafe version ofpersistent.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static VkRect2DnsrcRect(long struct)Unsafe version ofsrcRect().static voidnsrcRect(long struct, VkRect2D value)Unsafe version ofsrcRect.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.booleanpersistent()Returns the value of thepersistentfield.VkDisplayPresentInfoKHRpersistent(boolean value)Sets the specified value to thepersistentfield.longpNext()Returns the value of thepNextfield.VkDisplayPresentInfoKHRpNext(long value)Sets the specified value to thepNextfield.VkDisplayPresentInfoKHRset(int sType, long pNext, VkRect2D srcRect, VkRect2D dstRect, boolean persistent)Initializes this struct with the specified values.VkDisplayPresentInfoKHRset(VkDisplayPresentInfoKHR src)Copies the specified struct data to this struct.intsizeof()VkRect2DsrcRect()Returns aVkRect2Dview of thesrcRectfield.VkDisplayPresentInfoKHRsrcRect(java.util.function.Consumer<VkRect2D> consumer)Passes thesrcRectfield to the specifiedConsumer.VkDisplayPresentInfoKHRsrcRect(VkRect2D value)Copies the specifiedVkRect2Dto thesrcRectfield.intsType()Returns the value of thesTypefield.VkDisplayPresentInfoKHRsType(int value)Sets the specified value to thesTypefield.
-
-
-
Constructor Detail
-
VkDisplayPresentInfoKHR
public VkDisplayPresentInfoKHR(java.nio.ByteBuffer container)
Creates aVkDisplayPresentInfoKHRinstance 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.
-
persistent
public boolean persistent()
Returns the value of thepersistentfield.
-
sType
public VkDisplayPresentInfoKHR sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkDisplayPresentInfoKHR pNext(long value)
Sets the specified value to thepNextfield.
-
srcRect
public VkDisplayPresentInfoKHR srcRect(VkRect2D value)
Copies the specifiedVkRect2Dto thesrcRectfield.
-
srcRect
public VkDisplayPresentInfoKHR srcRect(java.util.function.Consumer<VkRect2D> consumer)
Passes thesrcRectfield to the specifiedConsumer.
-
dstRect
public VkDisplayPresentInfoKHR dstRect(VkRect2D value)
Copies the specifiedVkRect2Dto thedstRectfield.
-
dstRect
public VkDisplayPresentInfoKHR dstRect(java.util.function.Consumer<VkRect2D> consumer)
Passes thedstRectfield to the specifiedConsumer.
-
persistent
public VkDisplayPresentInfoKHR persistent(boolean value)
Sets the specified value to thepersistentfield.
-
set
public VkDisplayPresentInfoKHR set(int sType, long pNext, VkRect2D srcRect, VkRect2D dstRect, boolean persistent)
Initializes this struct with the specified values.
-
set
public VkDisplayPresentInfoKHR set(VkDisplayPresentInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkDisplayPresentInfoKHR malloc()
Returns a newVkDisplayPresentInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkDisplayPresentInfoKHR calloc()
Returns a newVkDisplayPresentInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkDisplayPresentInfoKHR create()
Returns a newVkDisplayPresentInfoKHRinstance allocated withBufferUtils.
-
create
public static VkDisplayPresentInfoKHR create(long address)
Returns a newVkDisplayPresentInfoKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkDisplayPresentInfoKHR createSafe(long address)
-
malloc
public static VkDisplayPresentInfoKHR.Buffer malloc(int capacity)
Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkDisplayPresentInfoKHR.Buffer calloc(int capacity)
Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkDisplayPresentInfoKHR.Buffer create(int capacity)
Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkDisplayPresentInfoKHR.Buffer create(long address, int capacity)
Create aVkDisplayPresentInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkDisplayPresentInfoKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkDisplayPresentInfoKHR mallocStack()
Returns a newVkDisplayPresentInfoKHRinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkDisplayPresentInfoKHR callocStack()
Returns a newVkDisplayPresentInfoKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkDisplayPresentInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDisplayPresentInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkDisplayPresentInfoKHR.Buffer mallocStack(int capacity)
Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkDisplayPresentInfoKHR.Buffer callocStack(int capacity)
Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkDisplayPresentInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkDisplayPresentInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR.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().
-
npersistent
public static int npersistent(long struct)
Unsafe version ofpersistent().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
npersistent
public static void npersistent(long struct, int value)Unsafe version ofpersistent.
-
-