Class VkPresentIdKHR

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkPresentIdKHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    The list of presentation identifiers.
    Description

    For applications to be able to reference specific presentation events queued by a call to vkQueuePresentKHR, an identifier needs to be associated with them. When the presentId feature is enabled, applications can include the VkPresentIdKHR structure in the pNext chain of the VkPresentInfoKHR structure to supply identifiers.

    Each VkSwapchainKHR has a presentId associated with it. This value is initially set to zero when the VkSwapchainKHR is created.

    When a VkPresentIdKHR structure with a non-NULL pPresentIds is included in the pNext chain of a VkPresentInfoKHR structure, each pSwapchains entry has a presentId associated in the pPresentIds array at the same index as the swapchain in the pSwapchains array. If this presentId is non-zero, then the application can later use this value to refer to that image presentation. A value of zero indicates that this presentation has no associated presentId. A non-zero presentId must be greater than any non-zero presentId passed previously by the application for the same swapchain.

    There is no requirement for any precise timing relationship between the presentation of the image to the user and the update of the presentId value, but implementations should make this as close as possible to the presentation of the first pixel in the new image to the user.

    Valid Usage
    • swapchainCount must be the same value as VkPresentInfoKHR::swapchainCount, where this VkPresentIdKHR is in the pNext chain of the VkPresentInfoKHR structure
    • Each presentIds entry must be greater than any previous presentIds entry passed for the associated pSwapchains entry
    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_PRESENT_ID_KHR
    • If pPresentIds is not NULL, pPresentIds must be a valid pointer to an array of swapchainCount uint64_t values
    • swapchainCount must be greater than 0

    Layout

    
     struct VkPresentIdKHR {
         VkStructureType sType();
         void const * pNext();
         uint32_t swapchainCount();
         uint64_t const * pPresentIds();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, SWAPCHAINCOUNT, PPRESENTIDS

        The struct member offsets.
    • Constructor Detail

      • VkPresentIdKHR

        public VkPresentIdKHR​(java.nio.ByteBuffer container)
        Creates a VkPresentIdKHR 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()
        the type of this structure.
      • pNext

        public long pNext()
        NULL or a pointer to a structure extending this structure.
      • swapchainCount

        public int swapchainCount()
        the number of swapchains being presented to the vkQueuePresentKHR command.
      • pPresentIds

        @Nullable
        public java.nio.LongBuffer pPresentIds()
        NULL or a pointer to an array of uint64_t with swapchainCount entries. If not NULL, each non-zero value in pPresentIds specifies the present id to be associated with the presentation of the swapchain with the same index in the QueuePresentKHR call.
      • pPresentIds

        public VkPresentIdKHR pPresentIds​(@Nullable
                                          java.nio.LongBuffer value)
        Sets the address of the specified LongBuffer to the pPresentIds() field.
      • set

        public VkPresentIdKHR set​(int sType,
                                  long pNext,
                                  int swapchainCount,
                                  @Nullable
                                  java.nio.LongBuffer pPresentIds)
        Initializes this struct with the specified values.
      • set

        public VkPresentIdKHR set​(VkPresentIdKHR src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

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

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

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

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

        @Nullable
        public static VkPresentIdKHR createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static VkPresentIdKHR.Buffer malloc​(int capacity)
        Returns a new VkPresentIdKHR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static VkPresentIdKHR.Buffer calloc​(int capacity)
        Returns a new VkPresentIdKHR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static VkPresentIdKHR.Buffer create​(long address,
                                                   int capacity)
        Create a VkPresentIdKHR.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static VkPresentIdKHR.Buffer createSafe​(long address,
                                                       int capacity)
        Like create, but returns null if address is NULL.
      • malloc

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

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

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

        public static VkPresentIdKHR.Buffer calloc​(int capacity,
                                                   org.lwjgl.system.MemoryStack stack)
        Returns a new VkPresentIdKHR.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().
      • nswapchainCount

        public static int nswapchainCount​(long struct)
        Unsafe version of swapchainCount().
      • npPresentIds

        @Nullable
        public static java.nio.LongBuffer npPresentIds​(long struct)
        Unsafe version of pPresentIds.
      • 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.
      • nswapchainCount

        public static void nswapchainCount​(long struct,
                                           int value)
        Sets the specified value to the swapchainCount field of the specified struct.
      • npPresentIds

        public static void npPresentIds​(long struct,
                                        @Nullable
                                        java.nio.LongBuffer value)
        Unsafe version of pPresentIds.