Class 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 and dstRect 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 presented
    • dstRect must specify a rectangular region that is a subset of the visibleRegion parameter of the display mode the swapchain being presented uses
    • If the persistentContent member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display the present operation targets then persistent must be FALSE
    Valid Usage (Implicit)
    See Also

    VkRect2D

    Member documentation

    • sType – the type of this structure.
    • pNextNULL 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. If VkDisplayPresentInfoKHR 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. If VkDisplayPresentInfoKHR 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 is TRUE, 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. If VkDisplayPresentInfoKHR is not specified, persistent mode will not be used.

    Layout

    
     struct VkDisplayPresentInfoKHR {
         VkStructureType sType;
         void const * pNext;
         VkRect2D srcRect;
         VkRect2D dstRect;
         VkBool32 persistent;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, SRCRECT, DSTRECT, PERSISTENT

        The struct member offsets.
    • Constructor Detail

      • VkDisplayPresentInfoKHR

        public VkDisplayPresentInfoKHR​(java.nio.ByteBuffer container)
        Creates a VkDisplayPresentInfoKHR instance at the current position of the specified ByteBuffer 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 class org.lwjgl.system.Struct
      • sType

        public int sType()
        Returns the value of the sType field.
      • pNext

        public long pNext()
        Returns the value of the pNext field.
      • srcRect

        public VkRect2D srcRect()
        Returns a VkRect2D view of the srcRect field.
      • dstRect

        public VkRect2D dstRect()
        Returns a VkRect2D view of the dstRect field.
      • persistent

        public boolean persistent()
        Returns the value of the persistent field.
      • persistent

        public VkDisplayPresentInfoKHR persistent​(boolean value)
        Sets the specified value to the persistent field.
      • malloc

        public static VkDisplayPresentInfoKHR malloc()
        Returns a new VkDisplayPresentInfoKHR instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static VkDisplayPresentInfoKHR calloc()
        Returns a new VkDisplayPresentInfoKHR instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static VkDisplayPresentInfoKHR create()
        Returns a new VkDisplayPresentInfoKHR instance allocated with BufferUtils.
      • create

        public static VkDisplayPresentInfoKHR create​(long address)
        Returns a new VkDisplayPresentInfoKHR instance for the specified memory address.
      • mallocStack

        public static VkDisplayPresentInfoKHR mallocStack()
        Returns a new VkDisplayPresentInfoKHR instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkDisplayPresentInfoKHR callocStack()
        Returns a new VkDisplayPresentInfoKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VkDisplayPresentInfoKHR mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkDisplayPresentInfoKHR instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static VkDisplayPresentInfoKHR callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkDisplayPresentInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • mallocStack

        public static VkDisplayPresentInfoKHR.Buffer mallocStack​(int capacity,
                                                                 org.lwjgl.system.MemoryStack stack)
        Returns a new VkDisplayPresentInfoKHR.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static VkDisplayPresentInfoKHR.Buffer callocStack​(int capacity,
                                                                 org.lwjgl.system.MemoryStack stack)
        Returns a new VkDisplayPresentInfoKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nsType

        public static int nsType​(long struct)
        Unsafe version of sType().
      • npNext

        public static long npNext​(long struct)
        Unsafe version of pNext().
      • nsrcRect

        public static VkRect2D nsrcRect​(long struct)
        Unsafe version of srcRect().
      • ndstRect

        public static VkRect2D ndstRect​(long struct)
        Unsafe version of dstRect().
      • npersistent

        public static int npersistent​(long struct)
        Unsafe version of persistent().
      • nsType

        public static void nsType​(long struct,
                                  int value)
        Unsafe version of sType.
      • npNext

        public static void npNext​(long struct,
                                  long value)
        Unsafe version of pNext.
      • nsrcRect

        public static void nsrcRect​(long struct,
                                    VkRect2D value)
        Unsafe version of srcRect.
      • ndstRect

        public static void ndstRect​(long struct,
                                    VkRect2D value)
        Unsafe version of dstRect.
      • npersistent

        public static void npersistent​(long struct,
                                       int value)
        Unsafe version of persistent.