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_swapchainextension is enabled additional fields can be specified when presenting an image to a swapchain by settingVkPresentInfoKHR::pNextto point to aVkDisplayPresentInfoKHRstructure.Valid Usage
sTypemust beSTRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHRpNextmust beNULLsrcRectmust 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 byGetPhysicalDeviceDisplayPropertiesKHRfor the display the present operation targets thenpersistentmust beFALSE
Member documentation
sType– the type of this structure. Must be:STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHRpNext– reserved for use by extensionssrcRect– 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– 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. IfVkDisplayPresentInfoKHRis not specified, persistent mode will not be used.
Layout
struct VkDisplayPresentInfoKHR { VkStructureType sType; const void * pNext;VkRect2DsrcRect;VkRect2DdstRect; VkBool32 persistent; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkDisplayPresentInfoKHR.BufferAn array ofVkDisplayPresentInfoKHRstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aVkDisplayPresentInfoKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and 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, MemoryStack stack)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDisplayPresentInfoKHRcallocStack(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 ornullif the address isNULL.static VkDisplayPresentInfoKHR.Buffercreate(long address, int capacity)Create aVkDisplayPresentInfoKHR.Bufferinstance at the specified memory.VkRect2DdstRect()Returns aVkRect2Dview of thedstRectfield.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, MemoryStack stack)Returns a newVkDisplayPresentInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkDisplayPresentInfoKHRmallocStack(MemoryStack stack)Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStack.VkDisplayPresentInfoKHRnset(long struct)Unsafe version ofset.intpersistent()Returns the value of thepersistentfield.VkDisplayPresentInfoKHRpersistent(int 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, int persistent)Initializes this struct with the specified values.VkDisplayPresentInfoKHRset(VkDisplayPresentInfoKHR src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).VkRect2DsrcRect()Returns aVkRect2Dview of thesrcRectfield.VkDisplayPresentInfoKHRsrcRect(VkRect2D value)Copies the specifiedVkRect2Dto thesrcRectfield.intsType()Returns the value of thesTypefield.VkDisplayPresentInfoKHRsType(int value)Sets the specified value to thesTypefield.-
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 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()
Description copied from class:StructReturns thesizeof(struct).
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
persistent
public int 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.
-
dstRect
public VkDisplayPresentInfoKHR dstRect(VkRect2D value)
Copies the specifiedVkRect2Dto thedstRectfield.
-
persistent
public VkDisplayPresentInfoKHR persistent(int value)
Sets the specified value to thepersistentfield.
-
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 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 ornullif the address isNULL.
-
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
-
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(MemoryStack stack)
Returns a newVkDisplayPresentInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDisplayPresentInfoKHR callocStack(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, 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, 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
-
-