Class VkPresentInfoKHR

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


    public class VkPresentInfoKHR
    extends Struct
    Khronos Reference Page
    Vulkan Specification

    Specifies the parameters of an image presentation.

    Valid Usage
    • sType must be STRUCTURE_TYPE_PRESENT_INFO_KHR
    • pNext must be NULL
    • If waitSemaphoreCount is not 0, and pWaitSemaphores is not NULL, pWaitSemaphores must be a pointer to an array of waitSemaphoreCount valid VkSemaphore handles
    • pSwapchains must be a pointer to an array of swapchainCount valid VkSwapchainKHR handles
    • pImageIndices must be a pointer to an array of swapchainCount uint32_t values
    • If pResults is not NULL, pResults must be a pointer to an array of swapchainCount VkResult values
    • swapchainCount must be greater than 0
    • Each of the elements of pSwapchains and the elements of pWaitSemaphores that are valid handles must have been created, allocated or retrieved from the same VkInstance
    • Any given element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array
    • Any given element of VkSemaphore in pWaitSemaphores must refer to a prior signal of that VkSemaphore that won't be consumed by any other wait on that semaphore

    Member documentation

    • sType – the type of this structure. Must be: STRUCTURE_TYPE_PRESENT_INFO_KHR
    • pNext – reserved for use by extensions
    • waitSemaphoreCount – the number of semaphores to wait for before issuing the present request. The number may be zero.
    • pWaitSemaphores – if non-NULL, is an array of VkSemaphore objects with waitSemaphoreCount entries, and specifies the semaphores to wait for before issuing the present request
    • swapchainCount – the number of swapchains being presented to by this command
    • pSwapchains – an array of VkSwapchainKHR objects with swapchainCount entries. A given swapchain must not appear in this list more than once.
    • pImageIndices – an array of indices into the array of each swapchain’s presentable images, with swapchainCount entries. Each entry in this array identifies the image to present on the corresponding entry in the pSwapchains array.
    • pResults – an array of VkResult typed elements with swapchainCount entries. Applications that don’t need per-swapchain results can use NULL for pResults. If non-NULL, each entry in pResults will be set to the VkResult for presenting the swapchain corresponding to the same index in pSwapchains.

    Layout

    struct VkPresentInfoKHR {
        VkStructureType sType;
        const void * pNext;
        uint32_t waitSemaphoreCount;
        const VkSemaphore * pWaitSemaphores;
        uint32_t swapchainCount;
        const VkSwapchainKHR * pSwapchains;
        const uint32_t * pImageIndices;
        VkResult * pResults;
    }
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • Constructor Detail

      • VkPresentInfoKHR

        public VkPresentInfoKHR(java.nio.ByteBuffer container)
        Creates a VkPresentInfoKHR 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()
        Description copied from class: Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class Struct
      • sType

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

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

        public int waitSemaphoreCount()
        Returns the value of the waitSemaphoreCount field.
      • pWaitSemaphores

        public java.nio.LongBuffer pWaitSemaphores()
        Returns a LongBuffer view of the data pointed to by the pWaitSemaphores field.
      • swapchainCount

        public int swapchainCount()
        Returns the value of the swapchainCount field.
      • pSwapchains

        public java.nio.LongBuffer pSwapchains()
        Returns a LongBuffer view of the data pointed to by the pSwapchains field.
      • pImageIndices

        public java.nio.IntBuffer pImageIndices()
        Returns a IntBuffer view of the data pointed to by the pImageIndices field.
      • pResults

        public java.nio.IntBuffer pResults()
        Returns a IntBuffer view of the data pointed to by the pResults field.
      • sType

        public VkPresentInfoKHR sType(int value)
        Sets the specified value to the sType field.
      • pNext

        public VkPresentInfoKHR pNext(long value)
        Sets the specified value to the pNext field.
      • pWaitSemaphores

        public VkPresentInfoKHR pWaitSemaphores(java.nio.LongBuffer value)
        Sets the address of the specified LongBuffer to the pWaitSemaphores field.
      • swapchainCount

        public VkPresentInfoKHR swapchainCount(int value)
        Sets the specified value to the swapchainCount field.
      • pSwapchains

        public VkPresentInfoKHR pSwapchains(java.nio.LongBuffer value)
        Sets the address of the specified LongBuffer to the pSwapchains field.
      • pImageIndices

        public VkPresentInfoKHR pImageIndices(java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the pImageIndices field.
      • pResults

        public VkPresentInfoKHR pResults(java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the pResults field.
      • set

        public VkPresentInfoKHR set(int sType,
                                    long pNext,
                                    java.nio.LongBuffer pWaitSemaphores,
                                    int swapchainCount,
                                    java.nio.LongBuffer pSwapchains,
                                    java.nio.IntBuffer pImageIndices,
                                    java.nio.IntBuffer pResults)
        Initializes this struct with the specified values.
      • set

        public VkPresentInfoKHR set(VkPresentInfoKHR src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • create

        public static VkPresentInfoKHR create(long address)
        Returns a new VkPresentInfoKHR instance for the specified memory address or null if the address is NULL.
      • validate

        public static void validate(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate(long array,
                                    int count)
        Calls VkPresentInfoKHR.validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array