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.NativeResource
Structure describing parameters of a queue presentation to a swapchain.Description
If the extent of the
srcRect
anddstRect
are not equal, the presented pixels will be scaled accordingly.Valid Usage
srcRect
must specify a rectangular region that is a subset of the image being presenteddstRect
must specify a rectangular region that is a subset of thevisibleRegion
parameter of the display mode the swapchain being presented uses- If the
persistentContent
member of theVkDisplayPropertiesKHR
structure returned byvkGetPhysicalDeviceDisplayPropertiesKHR
for the display the present operation targets thenpersistent
must beFALSE
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR
See Also
Member documentation
sType
– the type of this structure.pNext
–NULL
or 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. IfVkDisplayPresentInfoKHR
is 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. IfVkDisplayPresentInfoKHR
is 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. IfVkDisplayPresentInfoKHR
is not specified, persistent mode will not be used.
Layout
struct VkDisplayPresentInfoKHR { VkStructureType sType; void const * pNext;
VkRect2D
srcRect;VkRect2D
dstRect; VkBool32 persistent; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkDisplayPresentInfoKHR.Buffer
An array ofVkDisplayPresentInfoKHR
structs.
-
Constructor Summary
Constructors Constructor Description VkDisplayPresentInfoKHR(java.nio.ByteBuffer container)
Creates aVkDisplayPresentInfoKHR
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkDisplayPresentInfoKHR
calloc()
Returns a newVkDisplayPresentInfoKHR
instance allocated withmemCalloc
.static VkDisplayPresentInfoKHR.Buffer
calloc(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated withmemCalloc
.static VkDisplayPresentInfoKHR
callocStack()
Returns a newVkDisplayPresentInfoKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDisplayPresentInfoKHR.Buffer
callocStack(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDisplayPresentInfoKHR.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplayPresentInfoKHR
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplayPresentInfoKHR
create()
Returns a newVkDisplayPresentInfoKHR
instance allocated withBufferUtils
.static VkDisplayPresentInfoKHR.Buffer
create(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated withBufferUtils
.static VkDisplayPresentInfoKHR
create(long address)
Returns a newVkDisplayPresentInfoKHR
instance for the specified memory address.static VkDisplayPresentInfoKHR.Buffer
create(long address, int capacity)
Create aVkDisplayPresentInfoKHR.Buffer
instance at the specified memory.static VkDisplayPresentInfoKHR
createSafe(long address)
static VkDisplayPresentInfoKHR.Buffer
createSafe(long address, int capacity)
VkRect2D
dstRect()
Returns aVkRect2D
view of thedstRect
field.VkDisplayPresentInfoKHR
dstRect(java.util.function.Consumer<VkRect2D> consumer)
Passes thedstRect
field to the specifiedConsumer
.VkDisplayPresentInfoKHR
dstRect(VkRect2D value)
Copies the specifiedVkRect2D
to thedstRect
field.static VkDisplayPresentInfoKHR
malloc()
Returns a newVkDisplayPresentInfoKHR
instance allocated withmemAlloc
.static VkDisplayPresentInfoKHR.Buffer
malloc(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated withmemAlloc
.static VkDisplayPresentInfoKHR
mallocStack()
Returns a newVkDisplayPresentInfoKHR
instance allocated on the thread-localMemoryStack
.static VkDisplayPresentInfoKHR.Buffer
mallocStack(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
.static VkDisplayPresentInfoKHR.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkDisplayPresentInfoKHR
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR
instance allocated on the specifiedMemoryStack
.static VkRect2D
ndstRect(long struct)
Unsafe version ofdstRect()
.static void
ndstRect(long struct, VkRect2D value)
Unsafe version ofdstRect
.static int
npersistent(long struct)
Unsafe version ofpersistent()
.static void
npersistent(long struct, int value)
Unsafe version ofpersistent
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static VkRect2D
nsrcRect(long struct)
Unsafe version ofsrcRect()
.static void
nsrcRect(long struct, VkRect2D value)
Unsafe version ofsrcRect
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.boolean
persistent()
Returns the value of thepersistent
field.VkDisplayPresentInfoKHR
persistent(boolean value)
Sets the specified value to thepersistent
field.long
pNext()
Returns the value of thepNext
field.VkDisplayPresentInfoKHR
pNext(long value)
Sets the specified value to thepNext
field.VkDisplayPresentInfoKHR
set(int sType, long pNext, VkRect2D srcRect, VkRect2D dstRect, boolean persistent)
Initializes this struct with the specified values.VkDisplayPresentInfoKHR
set(VkDisplayPresentInfoKHR src)
Copies the specified struct data to this struct.int
sizeof()
VkRect2D
srcRect()
Returns aVkRect2D
view of thesrcRect
field.VkDisplayPresentInfoKHR
srcRect(java.util.function.Consumer<VkRect2D> consumer)
Passes thesrcRect
field to the specifiedConsumer
.VkDisplayPresentInfoKHR
srcRect(VkRect2D value)
Copies the specifiedVkRect2D
to thesrcRect
field.int
sType()
Returns the value of thesType
field.VkDisplayPresentInfoKHR
sType(int value)
Sets the specified value to thesType
field.
-
-
-
Constructor Detail
-
VkDisplayPresentInfoKHR
public VkDisplayPresentInfoKHR(java.nio.ByteBuffer container)
Creates aVkDisplayPresentInfoKHR
instance at the current position of the specifiedByteBuffer
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
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
persistent
public boolean persistent()
Returns the value of thepersistent
field.
-
sType
public VkDisplayPresentInfoKHR sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkDisplayPresentInfoKHR pNext(long value)
Sets the specified value to thepNext
field.
-
srcRect
public VkDisplayPresentInfoKHR srcRect(VkRect2D value)
Copies the specifiedVkRect2D
to thesrcRect
field.
-
srcRect
public VkDisplayPresentInfoKHR srcRect(java.util.function.Consumer<VkRect2D> consumer)
Passes thesrcRect
field to the specifiedConsumer
.
-
dstRect
public VkDisplayPresentInfoKHR dstRect(VkRect2D value)
Copies the specifiedVkRect2D
to thedstRect
field.
-
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 newVkDisplayPresentInfoKHR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDisplayPresentInfoKHR calloc()
Returns a newVkDisplayPresentInfoKHR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDisplayPresentInfoKHR create()
Returns a newVkDisplayPresentInfoKHR
instance allocated withBufferUtils
.
-
create
public static VkDisplayPresentInfoKHR create(long address)
Returns a newVkDisplayPresentInfoKHR
instance for the specified memory address.
-
createSafe
@Nullable public static VkDisplayPresentInfoKHR createSafe(long address)
-
malloc
public static VkDisplayPresentInfoKHR.Buffer malloc(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDisplayPresentInfoKHR.Buffer calloc(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDisplayPresentInfoKHR.Buffer create(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDisplayPresentInfoKHR.Buffer create(long address, int capacity)
Create aVkDisplayPresentInfoKHR.Buffer
instance 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 newVkDisplayPresentInfoKHR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDisplayPresentInfoKHR callocStack()
Returns a newVkDisplayPresentInfoKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDisplayPresentInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDisplayPresentInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDisplayPresentInfoKHR.Buffer callocStack(int capacity)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-