Class VkSwapchainCreateInfoKHR

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, FLAGS, SURFACE, MINIMAGECOUNT, IMAGEFORMAT, IMAGECOLORSPACE, IMAGEEXTENT, IMAGEARRAYLAYERS, IMAGEUSAGE, IMAGESHARINGMODE, QUEUEFAMILYINDEXCOUNT, PQUEUEFAMILYINDICES, PRETRANSFORM, COMPOSITEALPHA, PRESENTMODE, CLIPPED, OLDSWAPCHAIN

        The struct member offsets.
    • Constructor Detail

      • VkSwapchainCreateInfoKHR

        public VkSwapchainCreateInfoKHR​(java.nio.ByteBuffer container)
        Creates a VkSwapchainCreateInfoKHR 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.
      • flags

        public int flags()
        a bitmask of VkSwapchainCreateFlagBitsKHR indicating parameters of the swapchain creation.
      • surface

        public long surface()
        the surface onto which the swapchain will present images. If the creation succeeds, the swapchain becomes associated with surface.
      • minImageCount

        public int minImageCount()
        the minimum number of presentable images that the application needs. The implementation will either create the swapchain with at least that many images, or it will fail to create the swapchain.
      • imageFormat

        public int imageFormat()
        a VkFormat value specifying the format the swapchain image(s) will be created with.
      • imageColorSpace

        public int imageColorSpace()
        a VkColorSpaceKHR value specifying the way the swapchain interprets image data.
      • imageExtent

        public VkExtent2D imageExtent()
        the size (in pixels) of the swapchain image(s). The behavior is platform-dependent if the image extent does not match the surface’s currentExtent as returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR.
        Note

        On some platforms, it is normal that maxImageExtent may become (0, 0), for example when the window is minimized. In such a case, it is not possible to create a swapchain due to the Valid Usage requirements.

      • imageArrayLayers

        public int imageArrayLayers()
        the number of views in a multiview/stereo surface. For non-stereoscopic-3D applications, this value is 1.
      • imageUsage

        public int imageUsage()
        a bitmask of VkImageUsageFlagBits describing the intended usage of the (acquired) swapchain images.
      • imageSharingMode

        public int imageSharingMode()
        the sharing mode used for the image(s) of the swapchain.
      • queueFamilyIndexCount

        public int queueFamilyIndexCount()
        the number of queue families having access to the image(s) of the swapchain when imageSharingMode is SHARING_MODE_CONCURRENT.
      • pQueueFamilyIndices

        @Nullable
        public java.nio.IntBuffer pQueueFamilyIndices()
        a pointer to an array of queue family indices having access to the images(s) of the swapchain when imageSharingMode is SHARING_MODE_CONCURRENT.
      • preTransform

        public int preTransform()
        a VkSurfaceTransformFlagBitsKHR value describing the transform, relative to the presentation engine’s natural orientation, applied to the image content prior to presentation. If it does not match the currentTransform value returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR, the presentation engine will transform the image content as part of the presentation operation.
      • compositeAlpha

        public int compositeAlpha()
        a VkCompositeAlphaFlagBitsKHR value indicating the alpha compositing mode to use when this surface is composited together with other surfaces on certain window systems.
      • presentMode

        public int presentMode()
        the presentation mode the swapchain will use. A swapchain’s present mode determines how incoming present requests will be processed and queued internally.
      • clipped

        public boolean clipped()
        specifies whether the Vulkan implementation is allowed to discard rendering operations that affect regions of the surface that are not visible.
        • If set to TRUE, the presentable images associated with the swapchain may not own all of their pixels. Pixels in the presentable images that correspond to regions of the target surface obscured by another window on the desktop, or subject to some other clipping mechanism will have undefined content when read back. Fragment shaders may not execute for these pixels, and thus any side effects they would have had will not occur. Setting TRUE does not guarantee any clipping will occur, but allows more efficient presentation methods to be used on some platforms.
        • If set to FALSE, presentable images associated with the swapchain will own all of the pixels they contain.
          Note

          Applications should set this value to TRUE if they do not expect to read back the content of presentable images before presenting them or after reacquiring them, and if their fragment shaders do not have any side effects that require them to run for all pixels in the presentable image.

      • oldSwapchain

        public long oldSwapchain()
        NULL_HANDLE, or the existing non-retired swapchain currently associated with surface. Providing a valid oldSwapchain may aid in the resource reuse, and also allows the application to still present any images that are already acquired from it.

        Upon calling vkCreateSwapchainKHR with an oldSwapchain that is not NULL_HANDLE, oldSwapchain is retired — even if creation of the new swapchain fails. The new swapchain is created in the non-retired state whether or not oldSwapchain is NULL_HANDLE.

        Upon calling vkCreateSwapchainKHR with an oldSwapchain that is not NULL_HANDLE, any images from oldSwapchain that are not acquired by the application may be freed by the implementation, which may occur even if creation of the new swapchain fails. The application can destroy oldSwapchain to free all memory associated with oldSwapchain.

        Note

        Multiple retired swapchains can be associated with the same VkSurfaceKHR through multiple uses of oldSwapchain that outnumber calls to DestroySwapchainKHR.

        After oldSwapchain is retired, the application can pass to QueuePresentKHR any images it had already acquired from oldSwapchain. E.g., an application may present an image from the old swapchain before an image from the new swapchain is ready to be presented. As usual, QueuePresentKHR may fail if oldSwapchain has entered a state that causes ERROR_OUT_OF_DATE_KHR to be returned.

        The application can continue to use a shared presentable image obtained from oldSwapchain until a presentable image is acquired from the new swapchain, as long as it has not entered a state that causes it to return ERROR_OUT_OF_DATE_KHR.

      • set

        public VkSwapchainCreateInfoKHR set​(int sType,
                                            long pNext,
                                            int flags,
                                            long surface,
                                            int minImageCount,
                                            int imageFormat,
                                            int imageColorSpace,
                                            VkExtent2D imageExtent,
                                            int imageArrayLayers,
                                            int imageUsage,
                                            int imageSharingMode,
                                            int queueFamilyIndexCount,
                                            @Nullable
                                            java.nio.IntBuffer pQueueFamilyIndices,
                                            int preTransform,
                                            int compositeAlpha,
                                            int presentMode,
                                            boolean clipped,
                                            long oldSwapchain)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

        public static int nflags​(long struct)
        Unsafe version of flags().
      • nsurface

        public static long nsurface​(long struct)
        Unsafe version of surface().
      • nminImageCount

        public static int nminImageCount​(long struct)
        Unsafe version of minImageCount().
      • nimageFormat

        public static int nimageFormat​(long struct)
        Unsafe version of imageFormat().
      • nimageColorSpace

        public static int nimageColorSpace​(long struct)
        Unsafe version of imageColorSpace().
      • nimageArrayLayers

        public static int nimageArrayLayers​(long struct)
        Unsafe version of imageArrayLayers().
      • nimageUsage

        public static int nimageUsage​(long struct)
        Unsafe version of imageUsage().
      • nimageSharingMode

        public static int nimageSharingMode​(long struct)
        Unsafe version of imageSharingMode().
      • nqueueFamilyIndexCount

        public static int nqueueFamilyIndexCount​(long struct)
        Unsafe version of queueFamilyIndexCount().
      • npQueueFamilyIndices

        @Nullable
        public static java.nio.IntBuffer npQueueFamilyIndices​(long struct)
        Unsafe version of pQueueFamilyIndices.
      • npreTransform

        public static int npreTransform​(long struct)
        Unsafe version of preTransform().
      • ncompositeAlpha

        public static int ncompositeAlpha​(long struct)
        Unsafe version of compositeAlpha().
      • npresentMode

        public static int npresentMode​(long struct)
        Unsafe version of presentMode().
      • nclipped

        public static int nclipped​(long struct)
        Unsafe version of clipped().
      • noldSwapchain

        public static long noldSwapchain​(long struct)
        Unsafe version of oldSwapchain().
      • 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.
      • nflags

        public static void nflags​(long struct,
                                  int value)
        Unsafe version of flags.
      • nsurface

        public static void nsurface​(long struct,
                                    long value)
        Unsafe version of surface.
      • nminImageCount

        public static void nminImageCount​(long struct,
                                          int value)
        Unsafe version of minImageCount.
      • nimageFormat

        public static void nimageFormat​(long struct,
                                        int value)
        Unsafe version of imageFormat.
      • nimageColorSpace

        public static void nimageColorSpace​(long struct,
                                            int value)
        Unsafe version of imageColorSpace.
      • nimageExtent

        public static void nimageExtent​(long struct,
                                        VkExtent2D value)
        Unsafe version of imageExtent.
      • nimageArrayLayers

        public static void nimageArrayLayers​(long struct,
                                             int value)
        Unsafe version of imageArrayLayers.
      • nimageUsage

        public static void nimageUsage​(long struct,
                                       int value)
        Unsafe version of imageUsage.
      • nimageSharingMode

        public static void nimageSharingMode​(long struct,
                                             int value)
        Unsafe version of imageSharingMode.
      • nqueueFamilyIndexCount

        public static void nqueueFamilyIndexCount​(long struct,
                                                  int value)
        Sets the specified value to the queueFamilyIndexCount field of the specified struct.
      • npQueueFamilyIndices

        public static void npQueueFamilyIndices​(long struct,
                                                @Nullable
                                                java.nio.IntBuffer value)
        Unsafe version of pQueueFamilyIndices.
      • npreTransform

        public static void npreTransform​(long struct,
                                         int value)
        Unsafe version of preTransform.
      • ncompositeAlpha

        public static void ncompositeAlpha​(long struct,
                                           int value)
        Unsafe version of compositeAlpha.
      • npresentMode

        public static void npresentMode​(long struct,
                                        int value)
        Unsafe version of presentMode.
      • nclipped

        public static void nclipped​(long struct,
                                    int value)
        Unsafe version of clipped.
      • noldSwapchain

        public static void noldSwapchain​(long struct,
                                         long value)
        Unsafe version of oldSwapchain.