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 isFALSE, thenpersistentmust beFALSE
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR
See Also
Layout
struct VkDisplayPresentInfoKHR { VkStructureTypesType(); void const *pNext();VkRect2DsrcRect();VkRect2DdstRect(); VkBool32persistent(); }
-
-
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 Deprecated 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 VkDisplayPresentInfoKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayPresentInfoKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayPresentInfoKHRcallocStack()Deprecated.static VkDisplayPresentInfoKHR.BuffercallocStack(int capacity)Deprecated.static VkDisplayPresentInfoKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkDisplayPresentInfoKHRcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()a rectangular region within the visible region of the swapchain’s display mode.VkDisplayPresentInfoKHRdstRect(java.util.function.Consumer<VkRect2D> consumer)Passes thedstRect()field to the specifiedConsumer.VkDisplayPresentInfoKHRdstRect(VkRect2D value)static VkDisplayPresentInfoKHRmalloc()Returns a newVkDisplayPresentInfoKHRinstance allocated withmemAlloc.static VkDisplayPresentInfoKHR.Buffermalloc(int capacity)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated withmemAlloc.static VkDisplayPresentInfoKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkDisplayPresentInfoKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStack.static VkDisplayPresentInfoKHRmallocStack()Deprecated.static VkDisplayPresentInfoKHR.BuffermallocStack(int capacity)Deprecated.static VkDisplayPresentInfoKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkDisplayPresentInfoKHRmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()If this isTRUE, the display engine will enable buffered mode on displays that support it.VkDisplayPresentInfoKHRpersistent(boolean value)Sets the specified value to thepersistent()field.longpNext()NULLor a pointer to a structure extending this structure.VkDisplayPresentInfoKHRpNext(long value)Sets the specified value to thepNext()field.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()a rectangular region of pixels to present.VkDisplayPresentInfoKHRsrcRect(java.util.function.Consumer<VkRect2D> consumer)Passes thesrcRect()field to the specifiedConsumer.VkDisplayPresentInfoKHRsrcRect(VkRect2D value)intsType()the type of this structure.VkDisplayPresentInfoKHRsType(int value)Sets the specified value to thesType()field.VkDisplayPresentInfoKHRsType$Default()Sets theSTRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHRvalue to thesType()field.
-
-
-
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()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
srcRect
public VkRect2D 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
public VkRect2D 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 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
public boolean 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.
-
sType
public VkDisplayPresentInfoKHR sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkDisplayPresentInfoKHR sType$Default()
Sets theSTRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHRvalue to thesType()field.
-
pNext
public VkDisplayPresentInfoKHR pNext(long value)
Sets the specified value to thepNext()field.
-
srcRect
public VkDisplayPresentInfoKHR srcRect(VkRect2D value)
-
srcRect
public VkDisplayPresentInfoKHR srcRect(java.util.function.Consumer<VkRect2D> consumer)
Passes thesrcRect()field to the specifiedConsumer.
-
dstRect
public VkDisplayPresentInfoKHR dstRect(VkRect2D value)
-
dstRect
public VkDisplayPresentInfoKHR dstRect(java.util.function.Consumer<VkRect2D> consumer)
Passes thedstRect()field to the specifiedConsumer.
-
persistent
public VkDisplayPresentInfoKHR persistent(boolean value)
Sets the specified value to thepersistent()field.
-
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
@Deprecated public static VkDisplayPresentInfoKHR mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkDisplayPresentInfoKHR callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDisplayPresentInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkDisplayPresentInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDisplayPresentInfoKHR.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkDisplayPresentInfoKHR.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDisplayPresentInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkDisplayPresentInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkDisplayPresentInfoKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkDisplayPresentInfoKHR calloc(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
-
malloc
public static VkDisplayPresentInfoKHR.Buffer malloc(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
-
calloc
public static VkDisplayPresentInfoKHR.Buffer calloc(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.
-
-