Class VulkanSwapChainCreateInfo
java.lang.Object
com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanSwapChainCreateInfo
- All Implemented Interfaces:
VulkanSwapChainCreateInfoType
public final class VulkanSwapChainCreateInfo
extends Object
implements VulkanSwapChainCreateInfoType
Information needed to create a swap chain.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanSwapChainCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanSwapChainCreateInfo.booleanclipped()static VulkanSwapChainCreateInfocopyOf(VulkanSwapChainCreateInfoType instance) Creates an immutable copy of aVulkanSwapChainCreateInfoTypevalue.booleanThis instance is equal to all instances ofVulkanSwapChainCreateInfothat have equal attribute values.inthashCode()Computes a hash code from attributes:surface,minimumImageCount,imageFormat,imageColorSpace,imageExtent,imageArrayLayers,imageUsageFlags,imageSharingMode,queueFamilyIndices,preTransform,compositeAlpha,presentMode,clipped,oldSwapChain.intintstatic VulkanSwapChainCreateInfoof(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType surface, int minimumImageCount, VulkanFormat imageFormat, VulkanColorSpaceKHR imageColorSpace, VulkanExtent2D imageExtent, int imageArrayLayers, Iterable<VulkanImageUsageFlag> imageUsageFlags, VulkanSharingMode imageSharingMode, Iterable<? extends VulkanQueueFamilyIndex> queueFamilyIndices, Iterable<VulkanSurfaceTransformFlagKHR> preTransform, Iterable<VulkanCompositeAlphaFlagKHR> compositeAlpha, VulkanPresentModeKHR presentMode, boolean clipped, Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain) Construct a new immutableVulkanSwapChainCreateInfoinstance.static VulkanSwapChainCreateInfoof(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType surface, int minimumImageCount, VulkanFormat imageFormat, VulkanColorSpaceKHR imageColorSpace, VulkanExtent2D imageExtent, int imageArrayLayers, Set<VulkanImageUsageFlag> imageUsageFlags, VulkanSharingMode imageSharingMode, List<VulkanQueueFamilyIndex> queueFamilyIndices, Set<VulkanSurfaceTransformFlagKHR> preTransform, Set<VulkanCompositeAlphaFlagKHR> compositeAlpha, VulkanPresentModeKHR presentMode, boolean clipped, Optional<VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain) Construct a new immutableVulkanSwapChainCreateInfoinstance.surface()toString()Prints the immutable valueVulkanSwapChainCreateInfowith attribute values.withClipped(boolean value) Copy the current immutable object by setting a value for theclippedattribute.withCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements) Copy the current immutable object with elements that replace the content ofcompositeAlpha.Copy the current immutable object with elements that replace the content ofcompositeAlpha.withImageArrayLayers(int value) Copy the current immutable object by setting a value for theimageArrayLayersattribute.Copy the current immutable object by setting a value for theimageColorSpaceattribute.withImageExtent(VulkanExtent2D value) Copy the current immutable object by setting a value for theimageExtentattribute.withImageFormat(VulkanFormat value) Copy the current immutable object by setting a value for theimageFormatattribute.Copy the current immutable object by setting a value for theimageSharingModeattribute.withImageUsageFlags(VulkanImageUsageFlag... elements) Copy the current immutable object with elements that replace the content ofimageUsageFlags.withImageUsageFlags(Iterable<VulkanImageUsageFlag> elements) Copy the current immutable object with elements that replace the content ofimageUsageFlags.withMinimumImageCount(int value) Copy the current immutable object by setting a value for theminimumImageCountattribute.Copy the current immutable object by setting a present value for the optionaloldSwapChainattribute.withOldSwapChain(Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> optional) Copy the current immutable object by setting an optional value for theoldSwapChainattribute.Copy the current immutable object by setting a value for thepresentModeattribute.withPreTransform(VulkanSurfaceTransformFlagKHR... elements) Copy the current immutable object with elements that replace the content ofpreTransform.Copy the current immutable object with elements that replace the content ofpreTransform.withQueueFamilyIndices(VulkanQueueFamilyIndex... elements) Copy the current immutable object with elements that replace the content ofqueueFamilyIndices.withQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Copy the current immutable object with elements that replace the content ofqueueFamilyIndices.Copy the current immutable object by setting a value for thesurfaceattribute.
-
Method Details
-
surface
- Specified by:
surfacein interfaceVulkanSwapChainCreateInfoType- Returns:
- The swapchain's target surface
-
minimumImageCount
public int minimumImageCount()- Specified by:
minimumImageCountin interfaceVulkanSwapChainCreateInfoType- Returns:
- The minimum number of presentation images the application needs
-
imageFormat
- Specified by:
imageFormatin interfaceVulkanSwapChainCreateInfoType- Returns:
- The format of the presentation images
-
imageColorSpace
- Specified by:
imageColorSpacein interfaceVulkanSwapChainCreateInfoType- Returns:
- The colorspace of the presentation images
-
imageExtent
- Specified by:
imageExtentin interfaceVulkanSwapChainCreateInfoType- Returns:
- The dimensions of the presentation images
-
imageArrayLayers
public int imageArrayLayers()- Specified by:
imageArrayLayersin interfaceVulkanSwapChainCreateInfoType- Returns:
- The number of views for multiview/stereo presentation
-
imageUsageFlags
- Specified by:
imageUsageFlagsin interfaceVulkanSwapChainCreateInfoType- Returns:
- The sharing mode used for the presentation images
-
imageSharingMode
- Specified by:
imageSharingModein interfaceVulkanSwapChainCreateInfoType- Returns:
- The sharing mode used for the presentation images
-
queueFamilyIndices
- Specified by:
queueFamilyIndicesin interfaceVulkanSwapChainCreateInfoType- Returns:
- The queue family indices having access to the images in case of concurrent sharing mode
-
preTransform
- Specified by:
preTransformin interfaceVulkanSwapChainCreateInfoType- Returns:
- The transform, relative to the device's natural orientation, applied to the image content prior to presentation
-
compositeAlpha
- Specified by:
compositeAlphain interfaceVulkanSwapChainCreateInfoType- Returns:
- The alpha blending mode used when compositing this surface with other surfaces in the window system
-
presentMode
- Specified by:
presentModein interfaceVulkanSwapChainCreateInfoType- Returns:
- The presentation mode to use for presents on this swap chain
-
clipped
public boolean clipped()- Specified by:
clippedin interfaceVulkanSwapChainCreateInfoType- Returns:
trueif presentable images may be affected by window clip regions
-
oldSwapChain
- Specified by:
oldSwapChainin interfaceVulkanSwapChainCreateInfoType- Returns:
- The existing swap chain to replace, if any
-
withSurface
public final VulkanSwapChainCreateInfo withSurface(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType value) Copy the current immutable object by setting a value for thesurfaceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for surface- Returns:
- A modified copy or the
thisobject
-
withMinimumImageCount
Copy the current immutable object by setting a value for theminimumImageCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minimumImageCount- Returns:
- A modified copy or the
thisobject
-
withImageFormat
Copy the current immutable object by setting a value for theimageFormatattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imageFormat- Returns:
- A modified copy or the
thisobject
-
withImageColorSpace
Copy the current immutable object by setting a value for theimageColorSpaceattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imageColorSpace- Returns:
- A modified copy or the
thisobject
-
withImageExtent
Copy the current immutable object by setting a value for theimageExtentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imageExtent- Returns:
- A modified copy or the
thisobject
-
withImageArrayLayers
Copy the current immutable object by setting a value for theimageArrayLayersattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imageArrayLayers- Returns:
- A modified copy or the
thisobject
-
withImageUsageFlags
Copy the current immutable object with elements that replace the content ofimageUsageFlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withImageUsageFlags
Copy the current immutable object with elements that replace the content ofimageUsageFlags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of imageUsageFlags elements to set- Returns:
- A modified copy or
thisif not changed
-
withImageSharingMode
Copy the current immutable object by setting a value for theimageSharingModeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imageSharingMode- Returns:
- A modified copy or the
thisobject
-
withQueueFamilyIndices
Copy the current immutable object with elements that replace the content ofqueueFamilyIndices.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withQueueFamilyIndices
public final VulkanSwapChainCreateInfo withQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Copy the current immutable object with elements that replace the content ofqueueFamilyIndices. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of queueFamilyIndices elements to set- Returns:
- A modified copy or
thisif not changed
-
withPreTransform
Copy the current immutable object with elements that replace the content ofpreTransform.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPreTransform
public final VulkanSwapChainCreateInfo withPreTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements) Copy the current immutable object with elements that replace the content ofpreTransform. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of preTransform elements to set- Returns:
- A modified copy or
thisif not changed
-
withCompositeAlpha
Copy the current immutable object with elements that replace the content ofcompositeAlpha.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCompositeAlpha
public final VulkanSwapChainCreateInfo withCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements) Copy the current immutable object with elements that replace the content ofcompositeAlpha. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of compositeAlpha elements to set- Returns:
- A modified copy or
thisif not changed
-
withPresentMode
Copy the current immutable object by setting a value for thepresentModeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for presentMode- Returns:
- A modified copy or the
thisobject
-
withClipped
Copy the current immutable object by setting a value for theclippedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for clipped- Returns:
- A modified copy or the
thisobject
-
withOldSwapChain
public final VulkanSwapChainCreateInfo withOldSwapChain(VulkanExtKHRSwapChainType.VulkanKHRSwapChainType value) Copy the current immutable object by setting a present value for the optionaloldSwapChainattribute.- Parameters:
value- The value for oldSwapChain- Returns:
- A modified copy or
thisif not changed
-
withOldSwapChain
public final VulkanSwapChainCreateInfo withOldSwapChain(Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> optional) Copy the current immutable object by setting an optional value for theoldSwapChainattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for oldSwapChain- Returns:
- A modified copy or
thisif not changed
-
equals
-
hashCode
public int hashCode()Computes a hash code from attributes:surface,minimumImageCount,imageFormat,imageColorSpace,imageExtent,imageArrayLayers,imageUsageFlags,imageSharingMode,queueFamilyIndices,preTransform,compositeAlpha,presentMode,clipped,oldSwapChain. -
toString
-
of
public static VulkanSwapChainCreateInfo of(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType surface, int minimumImageCount, VulkanFormat imageFormat, VulkanColorSpaceKHR imageColorSpace, VulkanExtent2D imageExtent, int imageArrayLayers, Set<VulkanImageUsageFlag> imageUsageFlags, VulkanSharingMode imageSharingMode, List<VulkanQueueFamilyIndex> queueFamilyIndices, Set<VulkanSurfaceTransformFlagKHR> preTransform, Set<VulkanCompositeAlphaFlagKHR> compositeAlpha, VulkanPresentModeKHR presentMode, boolean clipped, Optional<VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain) Construct a new immutableVulkanSwapChainCreateInfoinstance.- Parameters:
surface- The value for thesurfaceattributeminimumImageCount- The value for theminimumImageCountattributeimageFormat- The value for theimageFormatattributeimageColorSpace- The value for theimageColorSpaceattributeimageExtent- The value for theimageExtentattributeimageArrayLayers- The value for theimageArrayLayersattributeimageUsageFlags- The value for theimageUsageFlagsattributeimageSharingMode- The value for theimageSharingModeattributequeueFamilyIndices- The value for thequeueFamilyIndicesattributepreTransform- The value for thepreTransformattributecompositeAlpha- The value for thecompositeAlphaattributepresentMode- The value for thepresentModeattributeclipped- The value for theclippedattributeoldSwapChain- The value for theoldSwapChainattribute- Returns:
- An immutable VulkanSwapChainCreateInfo instance
-
of
public static VulkanSwapChainCreateInfo of(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType surface, int minimumImageCount, VulkanFormat imageFormat, VulkanColorSpaceKHR imageColorSpace, VulkanExtent2D imageExtent, int imageArrayLayers, Iterable<VulkanImageUsageFlag> imageUsageFlags, VulkanSharingMode imageSharingMode, Iterable<? extends VulkanQueueFamilyIndex> queueFamilyIndices, Iterable<VulkanSurfaceTransformFlagKHR> preTransform, Iterable<VulkanCompositeAlphaFlagKHR> compositeAlpha, VulkanPresentModeKHR presentMode, boolean clipped, Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain) Construct a new immutableVulkanSwapChainCreateInfoinstance.- Parameters:
surface- The value for thesurfaceattributeminimumImageCount- The value for theminimumImageCountattributeimageFormat- The value for theimageFormatattributeimageColorSpace- The value for theimageColorSpaceattributeimageExtent- The value for theimageExtentattributeimageArrayLayers- The value for theimageArrayLayersattributeimageUsageFlags- The value for theimageUsageFlagsattributeimageSharingMode- The value for theimageSharingModeattributequeueFamilyIndices- The value for thequeueFamilyIndicesattributepreTransform- The value for thepreTransformattributecompositeAlpha- The value for thecompositeAlphaattributepresentMode- The value for thepresentModeattributeclipped- The value for theclippedattributeoldSwapChain- The value for theoldSwapChainattribute- Returns:
- An immutable VulkanSwapChainCreateInfo instance
-
copyOf
Creates an immutable copy of aVulkanSwapChainCreateInfoTypevalue. 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 VulkanSwapChainCreateInfo instance
-
builder
Creates a builder forVulkanSwapChainCreateInfo.VulkanSwapChainCreateInfo.builder() .setSurface(com.io7m.jcoronado.extensions.khr_surface.api.VulkanExtKHRSurfaceType.VulkanKHRSurfaceType) // required
surface.setMinimumImageCount(int) // requiredminimumImageCount.setImageFormat(com.io7m.jcoronado.api.VulkanFormat) // requiredimageFormat.setImageColorSpace(com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanColorSpaceKHR) // requiredimageColorSpace.setImageExtent(com.io7m.jcoronado.api.VulkanExtent2D) // requiredimageExtent.setImageArrayLayers(int) // requiredimageArrayLayers.addImageUsageFlags|addAllImageUsageFlags(com.io7m.jcoronado.api.VulkanImageUsageFlag) //imageUsageFlagselements .setImageSharingMode(com.io7m.jcoronado.api.VulkanSharingMode) // requiredimageSharingMode.addQueueFamilyIndices|addAllQueueFamilyIndices(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) //queueFamilyIndiceselements .addPreTransform|addAllPreTransform(com.io7m.jcoronado.extensions.khr_surface.api.VulkanSurfaceTransformFlagKHR) //preTransformelements .addCompositeAlpha|addAllCompositeAlpha(com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanCompositeAlphaFlagKHR) //compositeAlphaelements .setPresentMode(com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanPresentModeKHR) // requiredpresentMode.setClipped(boolean) // requiredclipped.setOldSwapChain(Optional<com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanExtKHRSwapChainType.VulkanKHRSwapChainType>) // optionaloldSwapChain.build();- Returns:
- A new VulkanSwapChainCreateInfo builder
-