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, NativeResource, Pointer
public class VkDisplayPresentInfoKHR extends Struct
Khronos Reference Page
Vulkan SpecificationWhen the
VK_KHR_display_swapchain
extension is enabled additional fields can be specified when presenting an image to a swapchain by settingVkPresentInfoKHR
::pNext
to point to aVkDisplayPresentInfoKHR
structure.Valid Usage
sType
must beSTRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR
pNext
must beNULL
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 byGetPhysicalDeviceDisplayPropertiesKHR
for the display the present operation targets thenpersistent
must beFALSE
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR
pNext
– reserved for use by extensionssrcRect
– 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
– ifTRUE
, 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; const void * pNext;
VkRect2D
srcRect;VkRect2D
dstRect; VkBool32 persistent; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkDisplayPresentInfoKHR.Buffer
An array ofVkDisplayPresentInfoKHR
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and 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, MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDisplayPresentInfoKHR
callocStack(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 ornull
if the address isNULL
.static VkDisplayPresentInfoKHR.Buffer
create(long address, int capacity)
Create aVkDisplayPresentInfoKHR.Buffer
instance at the specified memory.VkRect2D
dstRect()
Returns aVkRect2D
view of thedstRect
field.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, MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkDisplayPresentInfoKHR
mallocStack(MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR
instance allocated on the specifiedMemoryStack
.VkDisplayPresentInfoKHR
nset(long struct)
Unsafe version ofset
.int
persistent()
Returns the value of thepersistent
field.VkDisplayPresentInfoKHR
persistent(int 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, int persistent)
Initializes this struct with the specified values.VkDisplayPresentInfoKHR
set(VkDisplayPresentInfoKHR src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.VkRect2D
srcRect()
Returns aVkRect2D
view of thesrcRect
field.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.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
persistent
public int 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.
-
dstRect
public VkDisplayPresentInfoKHR dstRect(VkRect2D value)
Copies the specifiedVkRect2D
to thedstRect
field.
-
persistent
public VkDisplayPresentInfoKHR persistent(int value)
Sets the specified value to thepersistent
field.
-
set
public VkDisplayPresentInfoKHR set(int sType, long pNext, VkRect2D srcRect, VkRect2D dstRect, int persistent)
Initializes this struct with the specified values.
-
nset
public VkDisplayPresentInfoKHR nset(long struct)
Unsafe version ofset
.
-
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 ornull
if the address isNULL
.
-
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
-
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(MemoryStack stack)
Returns a newVkDisplayPresentInfoKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDisplayPresentInfoKHR callocStack(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, 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, 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
-
-