Class VkSurfaceCapabilitiesKHR

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkSurfaceCapabilitiesKHR>
org.lwjgl.vulkan.VkSurfaceCapabilitiesKHR
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkSurfaceCapabilitiesKHR extends org.lwjgl.system.Struct<VkSurfaceCapabilitiesKHR> implements org.lwjgl.system.NativeResource
Structure describing capabilities of a surface.
Description
Note

Supported usage flags of a presentable image when using PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR presentation mode are provided by VkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags.

Note

Formulas such as min(N, maxImageCount) are not correct, since maxImageCount may be zero.

See Also

VkExtent2D, VkSurfaceCapabilities2KHR, GetPhysicalDeviceSurfaceCapabilitiesKHR

Layout


 struct VkSurfaceCapabilitiesKHR {
     uint32_t minImageCount();
     uint32_t maxImageCount();
     VkExtent2D currentExtent();
     VkExtent2D minImageExtent();
     VkExtent2D maxImageExtent();
     uint32_t maxImageArrayLayers();
     VkSurfaceTransformFlagsKHR supportedTransforms();
     VkSurfaceTransformFlagBitsKHR currentTransform();
     VkCompositeAlphaFlagsKHR supportedCompositeAlpha();
     VkImageUsageFlags supportedUsageFlags();
 }
  • Field Details

    • SIZEOF

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

      public static final int ALIGNOF
      The struct alignment in bytes.
    • MINIMAGECOUNT

      public static final int MINIMAGECOUNT
      The struct member offsets.
    • MAXIMAGECOUNT

      public static final int MAXIMAGECOUNT
      The struct member offsets.
    • CURRENTEXTENT

      public static final int CURRENTEXTENT
      The struct member offsets.
    • MINIMAGEEXTENT

      public static final int MINIMAGEEXTENT
      The struct member offsets.
    • MAXIMAGEEXTENT

      public static final int MAXIMAGEEXTENT
      The struct member offsets.
    • MAXIMAGEARRAYLAYERS

      public static final int MAXIMAGEARRAYLAYERS
      The struct member offsets.
    • SUPPORTEDTRANSFORMS

      public static final int SUPPORTEDTRANSFORMS
      The struct member offsets.
    • CURRENTTRANSFORM

      public static final int CURRENTTRANSFORM
      The struct member offsets.
    • SUPPORTEDCOMPOSITEALPHA

      public static final int SUPPORTEDCOMPOSITEALPHA
      The struct member offsets.
    • SUPPORTEDUSAGEFLAGS

      public static final int SUPPORTEDUSAGEFLAGS
      The struct member offsets.
  • Constructor Details

    • VkSurfaceCapabilitiesKHR

      public VkSurfaceCapabilitiesKHR(ByteBuffer container)
      Creates a VkSurfaceCapabilitiesKHR 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkSurfaceCapabilitiesKHR>
    • minImageCount

      public int minImageCount()
      the minimum number of images the specified device supports for a swapchain created for the surface, and will be at least one.
    • maxImageCount

      public int maxImageCount()
      the maximum number of images the specified device supports for a swapchain created for the surface, and will be either 0, or greater than or equal to minImageCount. A value of 0 means that there is no limit on the number of images, though there may be limits related to the total amount of memory used by presentable images.
    • currentExtent

      public VkExtent2D currentExtent()
      the current width and height of the surface, or the special value (0xFFFFFFFF, 0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain targeting the surface.
    • minImageExtent

      public VkExtent2D minImageExtent()
      contains the smallest valid swapchain extent for the surface on the specified device. The width and height of the extent will each be less than or equal to the corresponding width and height of currentExtent, unless currentExtent has the special value described above.
    • maxImageExtent

      public VkExtent2D maxImageExtent()
      contains the largest valid swapchain extent for the surface on the specified device. The width and height of the extent will each be greater than or equal to the corresponding width and height of minImageExtent. The width and height of the extent will each be greater than or equal to the corresponding width and height of currentExtent, unless currentExtent has the special value described above.
    • maxImageArrayLayers

      public int maxImageArrayLayers()
      the maximum number of layers presentable images can have for a swapchain created for this device and surface, and will be at least one.
    • supportedTransforms

      public int supportedTransforms()
      a bitmask of VkSurfaceTransformFlagBitsKHR indicating the presentation transforms supported for the surface on the specified device. At least one bit will be set.
    • currentTransform

      public int currentTransform()
      VkSurfaceTransformFlagBitsKHR value indicating the surface’s current transform relative to the presentation engine’s natural orientation.
    • supportedCompositeAlpha

      public int supportedCompositeAlpha()
      a bitmask of VkCompositeAlphaFlagBitsKHR, representing the alpha compositing modes supported by the presentation engine for the surface on the specified device, and at least one bit will be set. Opaque composition can be achieved in any alpha compositing mode by either using an image format that has no alpha component, or by ensuring that all pixels in the presentable images have an alpha value of 1.0.
    • supportedUsageFlags

      public int supportedUsageFlags()
      a bitmask of VkImageUsageFlagBits representing the ways the application can use the presentable images of a swapchain created with VkPresentModeKHR set to PRESENT_MODE_FIFO_LATEST_READY_EXT, PRESENT_MODE_IMMEDIATE_KHR, PRESENT_MODE_MAILBOX_KHR, PRESENT_MODE_FIFO_KHR or PRESENT_MODE_FIFO_RELAXED_KHR for the surface on the specified device. IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set. Implementations may support additional usages.
    • malloc

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

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

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

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

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

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

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

      public static VkSurfaceCapabilitiesKHR.Buffer create(int capacity)
      Returns a new VkSurfaceCapabilitiesKHR.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

      @Deprecated public static VkSurfaceCapabilitiesKHR mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkSurfaceCapabilitiesKHR callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkSurfaceCapabilitiesKHR mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkSurfaceCapabilitiesKHR callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkSurfaceCapabilitiesKHR.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkSurfaceCapabilitiesKHR.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkSurfaceCapabilitiesKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkSurfaceCapabilitiesKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

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

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

      public static int nmaxImageCount(long struct)
      Unsafe version of maxImageCount().
    • ncurrentExtent

      public static VkExtent2D ncurrentExtent(long struct)
      Unsafe version of currentExtent().
    • nminImageExtent

      public static VkExtent2D nminImageExtent(long struct)
      Unsafe version of minImageExtent().
    • nmaxImageExtent

      public static VkExtent2D nmaxImageExtent(long struct)
      Unsafe version of maxImageExtent().
    • nmaxImageArrayLayers

      public static int nmaxImageArrayLayers(long struct)
      Unsafe version of maxImageArrayLayers().
    • nsupportedTransforms

      public static int nsupportedTransforms(long struct)
      Unsafe version of supportedTransforms().
    • ncurrentTransform

      public static int ncurrentTransform(long struct)
      Unsafe version of currentTransform().
    • nsupportedCompositeAlpha

      public static int nsupportedCompositeAlpha(long struct)
      Unsafe version of supportedCompositeAlpha().
    • nsupportedUsageFlags

      public static int nsupportedUsageFlags(long struct)
      Unsafe version of supportedUsageFlags().