Class VulkanSurfaceCapabilitiesKHR
java.lang.Object
com.io7m.jcoronado.extensions.khr_surface.api.VulkanSurfaceCapabilitiesKHR
- All Implemented Interfaces:
VulkanSurfaceCapabilitiesKHRType
public final class VulkanSurfaceCapabilitiesKHR
extends Object
implements VulkanSurfaceCapabilitiesKHRType
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanSurfaceCapabilitiesKHR. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanSurfaceCapabilitiesKHR.static VulkanSurfaceCapabilitiesKHRcopyOf(VulkanSurfaceCapabilitiesKHRType instance) Creates an immutable copy of aVulkanSurfaceCapabilitiesKHRTypevalue.booleanThis instance is equal to all instances ofVulkanSurfaceCapabilitiesKHRthat have equal attribute values.inthashCode()Computes a hash code from attributes:minImageCount,maxImageCount,currentExtent,minImageExtent,maxImageExtent,maxImageArrayLayers,supportedTransforms,currentTransform,supportedCompositeAlpha,supportedUsageFlags.intintintstatic VulkanSurfaceCapabilitiesKHRof(int minImageCount, int maxImageCount, VulkanExtent2D currentExtent, VulkanExtent2D minImageExtent, VulkanExtent2D maxImageExtent, int maxImageArrayLayers, Iterable<VulkanSurfaceTransformFlagKHR> supportedTransforms, Iterable<VulkanSurfaceTransformFlagKHR> currentTransform, Iterable<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha, Iterable<VulkanImageUsageFlag> supportedUsageFlags) Construct a new immutableVulkanSurfaceCapabilitiesKHRinstance.static VulkanSurfaceCapabilitiesKHRof(int minImageCount, int maxImageCount, VulkanExtent2D currentExtent, VulkanExtent2D minImageExtent, VulkanExtent2D maxImageExtent, int maxImageArrayLayers, Set<VulkanSurfaceTransformFlagKHR> supportedTransforms, Set<VulkanSurfaceTransformFlagKHR> currentTransform, Set<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha, Set<VulkanImageUsageFlag> supportedUsageFlags) Construct a new immutableVulkanSurfaceCapabilitiesKHRinstance.toString()Prints the immutable valueVulkanSurfaceCapabilitiesKHRwith attribute values.withCurrentExtent(VulkanExtent2D value) Copy the current immutable object by setting a value for thecurrentExtentattribute.withCurrentTransform(VulkanSurfaceTransformFlagKHR... elements) Copy the current immutable object with elements that replace the content ofcurrentTransform.Copy the current immutable object with elements that replace the content ofcurrentTransform.withMaxImageArrayLayers(int value) Copy the current immutable object by setting a value for themaxImageArrayLayersattribute.withMaxImageCount(int value) Copy the current immutable object by setting a value for themaxImageCountattribute.withMaxImageExtent(VulkanExtent2D value) Copy the current immutable object by setting a value for themaxImageExtentattribute.withMinImageCount(int value) Copy the current immutable object by setting a value for theminImageCountattribute.withMinImageExtent(VulkanExtent2D value) Copy the current immutable object by setting a value for theminImageExtentattribute.withSupportedCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements) Copy the current immutable object with elements that replace the content ofsupportedCompositeAlpha.Copy the current immutable object with elements that replace the content ofsupportedCompositeAlpha.withSupportedTransforms(VulkanSurfaceTransformFlagKHR... elements) Copy the current immutable object with elements that replace the content ofsupportedTransforms.Copy the current immutable object with elements that replace the content ofsupportedTransforms.withSupportedUsageFlags(VulkanImageUsageFlag... elements) Copy the current immutable object with elements that replace the content ofsupportedUsageFlags.withSupportedUsageFlags(Iterable<VulkanImageUsageFlag> elements) Copy the current immutable object with elements that replace the content ofsupportedUsageFlags.
-
Method Details
-
minImageCount
public int minImageCount()- Specified by:
minImageCountin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the minimum number of images the specified device supports for a swapchain created for the surface.
-
maxImageCount
public int maxImageCount()- Specified by:
maxImageCountin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the maximum number of images the specified device supports for a swapchain created for the surface. 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 swapchain images.
-
currentExtent
- Specified by:
currentExtentin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- 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
- Specified by:
minImageExtentin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the smallest valid swapchain extent for the surface on the specified device.
-
maxImageExtent
- Specified by:
maxImageExtentin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the largest valid swapchain extent for the surface on the specified device.
-
maxImageArrayLayers
public int maxImageArrayLayers()- Specified by:
maxImageArrayLayersin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the maximum number of layers swapchain images can have for a swapchain created for this device and surface.
-
supportedTransforms
- Specified by:
supportedTransformsin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the presentation transforms supported for the surface on the specified device.
-
currentTransform
- Specified by:
currentTransformin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the surface’s current transform relative to the presentation engine’s natural orientation.
-
supportedCompositeAlpha
- Specified by:
supportedCompositeAlphain interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the alpha compositing modes supported by the presentation engine for the surface on the specified device. Opaque composition can be achieved in any alpha compositing mode by either using a swapchain image format that has no alpha component, or by ensuring that all pixels in the swapchain images have an alpha value of 1.0.
-
supportedUsageFlags
- Specified by:
supportedUsageFlagsin interfaceVulkanSurfaceCapabilitiesKHRType- Returns:
- the ways the application can use the presentable images of a swapchain created for the surface on the specified device. VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the set but implementations may support additional usages.
-
withMinImageCount
Copy the current immutable object by setting a value for theminImageCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minImageCount- Returns:
- A modified copy or the
thisobject
-
withMaxImageCount
Copy the current immutable object by setting a value for themaxImageCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxImageCount- Returns:
- A modified copy or the
thisobject
-
withCurrentExtent
Copy the current immutable object by setting a value for thecurrentExtentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for currentExtent- Returns:
- A modified copy or the
thisobject
-
withMinImageExtent
Copy the current immutable object by setting a value for theminImageExtentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minImageExtent- Returns:
- A modified copy or the
thisobject
-
withMaxImageExtent
Copy the current immutable object by setting a value for themaxImageExtentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxImageExtent- Returns:
- A modified copy or the
thisobject
-
withMaxImageArrayLayers
Copy the current immutable object by setting a value for themaxImageArrayLayersattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxImageArrayLayers- Returns:
- A modified copy or the
thisobject
-
withSupportedTransforms
public final VulkanSurfaceCapabilitiesKHR withSupportedTransforms(VulkanSurfaceTransformFlagKHR... elements) Copy the current immutable object with elements that replace the content ofsupportedTransforms.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSupportedTransforms
public final VulkanSurfaceCapabilitiesKHR withSupportedTransforms(Iterable<VulkanSurfaceTransformFlagKHR> elements) Copy the current immutable object with elements that replace the content ofsupportedTransforms. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of supportedTransforms elements to set- Returns:
- A modified copy or
thisif not changed
-
withCurrentTransform
public final VulkanSurfaceCapabilitiesKHR withCurrentTransform(VulkanSurfaceTransformFlagKHR... elements) Copy the current immutable object with elements that replace the content ofcurrentTransform.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCurrentTransform
public final VulkanSurfaceCapabilitiesKHR withCurrentTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements) Copy the current immutable object with elements that replace the content ofcurrentTransform. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of currentTransform elements to set- Returns:
- A modified copy or
thisif not changed
-
withSupportedCompositeAlpha
public final VulkanSurfaceCapabilitiesKHR withSupportedCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements) Copy the current immutable object with elements that replace the content ofsupportedCompositeAlpha.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSupportedCompositeAlpha
public final VulkanSurfaceCapabilitiesKHR withSupportedCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements) Copy the current immutable object with elements that replace the content ofsupportedCompositeAlpha. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of supportedCompositeAlpha elements to set- Returns:
- A modified copy or
thisif not changed
-
withSupportedUsageFlags
Copy the current immutable object with elements that replace the content ofsupportedUsageFlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSupportedUsageFlags
public final VulkanSurfaceCapabilitiesKHR withSupportedUsageFlags(Iterable<VulkanImageUsageFlag> elements) Copy the current immutable object with elements that replace the content ofsupportedUsageFlags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of supportedUsageFlags elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
-
hashCode
public int hashCode()Computes a hash code from attributes:minImageCount,maxImageCount,currentExtent,minImageExtent,maxImageExtent,maxImageArrayLayers,supportedTransforms,currentTransform,supportedCompositeAlpha,supportedUsageFlags. -
toString
-
of
public static VulkanSurfaceCapabilitiesKHR of(int minImageCount, int maxImageCount, VulkanExtent2D currentExtent, VulkanExtent2D minImageExtent, VulkanExtent2D maxImageExtent, int maxImageArrayLayers, Set<VulkanSurfaceTransformFlagKHR> supportedTransforms, Set<VulkanSurfaceTransformFlagKHR> currentTransform, Set<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha, Set<VulkanImageUsageFlag> supportedUsageFlags) Construct a new immutableVulkanSurfaceCapabilitiesKHRinstance.- Parameters:
minImageCount- The value for theminImageCountattributemaxImageCount- The value for themaxImageCountattributecurrentExtent- The value for thecurrentExtentattributeminImageExtent- The value for theminImageExtentattributemaxImageExtent- The value for themaxImageExtentattributemaxImageArrayLayers- The value for themaxImageArrayLayersattributesupportedTransforms- The value for thesupportedTransformsattributecurrentTransform- The value for thecurrentTransformattributesupportedCompositeAlpha- The value for thesupportedCompositeAlphaattributesupportedUsageFlags- The value for thesupportedUsageFlagsattribute- Returns:
- An immutable VulkanSurfaceCapabilitiesKHR instance
-
of
public static VulkanSurfaceCapabilitiesKHR of(int minImageCount, int maxImageCount, VulkanExtent2D currentExtent, VulkanExtent2D minImageExtent, VulkanExtent2D maxImageExtent, int maxImageArrayLayers, Iterable<VulkanSurfaceTransformFlagKHR> supportedTransforms, Iterable<VulkanSurfaceTransformFlagKHR> currentTransform, Iterable<VulkanCompositeAlphaFlagKHR> supportedCompositeAlpha, Iterable<VulkanImageUsageFlag> supportedUsageFlags) Construct a new immutableVulkanSurfaceCapabilitiesKHRinstance.- Parameters:
minImageCount- The value for theminImageCountattributemaxImageCount- The value for themaxImageCountattributecurrentExtent- The value for thecurrentExtentattributeminImageExtent- The value for theminImageExtentattributemaxImageExtent- The value for themaxImageExtentattributemaxImageArrayLayers- The value for themaxImageArrayLayersattributesupportedTransforms- The value for thesupportedTransformsattributecurrentTransform- The value for thecurrentTransformattributesupportedCompositeAlpha- The value for thesupportedCompositeAlphaattributesupportedUsageFlags- The value for thesupportedUsageFlagsattribute- Returns:
- An immutable VulkanSurfaceCapabilitiesKHR instance
-
copyOf
Creates an immutable copy of aVulkanSurfaceCapabilitiesKHRTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable VulkanSurfaceCapabilitiesKHR instance
-
builder
Creates a builder forVulkanSurfaceCapabilitiesKHR.VulkanSurfaceCapabilitiesKHR.builder() .setMinImageCount(int) // required
minImageCount.setMaxImageCount(int) // requiredmaxImageCount.setCurrentExtent(com.io7m.jcoronado.api.VulkanExtent2D) // requiredcurrentExtent.setMinImageExtent(com.io7m.jcoronado.api.VulkanExtent2D) // requiredminImageExtent.setMaxImageExtent(com.io7m.jcoronado.api.VulkanExtent2D) // requiredmaxImageExtent.setMaxImageArrayLayers(int) // requiredmaxImageArrayLayers.addSupportedTransforms|addAllSupportedTransforms(com.io7m.jcoronado.extensions.khr_surface.api.VulkanSurfaceTransformFlagKHR) //supportedTransformselements .addCurrentTransform|addAllCurrentTransform(com.io7m.jcoronado.extensions.khr_surface.api.VulkanSurfaceTransformFlagKHR) //currentTransformelements .addSupportedCompositeAlpha|addAllSupportedCompositeAlpha(com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanCompositeAlphaFlagKHR) //supportedCompositeAlphaelements .addSupportedUsageFlags|addAllSupportedUsageFlags(com.io7m.jcoronado.api.VulkanImageUsageFlag) //supportedUsageFlagselements .build();- Returns:
- A new VulkanSurfaceCapabilitiesKHR builder
-