Class VulkanSwapChainCreateInfo.Builder
java.lang.Object
com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanSwapChainCreateInfo.Builder
- Enclosing class:
VulkanSwapChainCreateInfo
Builds instances of type
VulkanSwapChainCreateInfo.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionAdds elements tocompositeAlphaset.addAllImageUsageFlags(Iterable<VulkanImageUsageFlag> elements) Adds elements toimageUsageFlagsset.Adds elements topreTransformset.addAllQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Adds elements toqueueFamilyIndiceslist.Adds one element tocompositeAlphaset.addCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements) Adds elements tocompositeAlphaset.addImageUsageFlags(VulkanImageUsageFlag element) Adds one element toimageUsageFlagsset.addImageUsageFlags(VulkanImageUsageFlag... elements) Adds elements toimageUsageFlagsset.Adds one element topreTransformset.addPreTransform(VulkanSurfaceTransformFlagKHR... elements) Adds elements topreTransformset.Adds one element toqueueFamilyIndiceslist.addQueueFamilyIndices(VulkanQueueFamilyIndex... elements) Adds elements toqueueFamilyIndiceslist.build()Builds a newVulkanSwapChainCreateInfo.from(VulkanSwapChainCreateInfoType instance) Fill a builder with attribute values from the providedVulkanSwapChainCreateInfoTypeinstance.setClipped(boolean clipped) Initializes the value for theclippedattribute.setCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements) Sets or replaces all elements forcompositeAlphaset.setImageArrayLayers(int imageArrayLayers) Initializes the value for theimageArrayLayersattribute.setImageColorSpace(VulkanColorSpaceKHR imageColorSpace) Initializes the value for theimageColorSpaceattribute.setImageExtent(VulkanExtent2D imageExtent) Initializes the value for theimageExtentattribute.setImageFormat(VulkanFormat imageFormat) Initializes the value for theimageFormatattribute.setImageSharingMode(VulkanSharingMode imageSharingMode) Initializes the value for theimageSharingModeattribute.setImageUsageFlags(Iterable<VulkanImageUsageFlag> elements) Sets or replaces all elements forimageUsageFlagsset.setMinimumImageCount(int minimumImageCount) Initializes the value for theminimumImageCountattribute.Initializes the optional valueoldSwapChainto oldSwapChain.setOldSwapChain(Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain) Initializes the optional valueoldSwapChainto oldSwapChain.setPresentMode(VulkanPresentModeKHR presentMode) Initializes the value for thepresentModeattribute.setPreTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements) Sets or replaces all elements forpreTransformset.setQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Sets or replaces all elements forqueueFamilyIndiceslist.Initializes the value for thesurfaceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanSwapChainCreateInfoTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setSurface
public final VulkanSwapChainCreateInfo.Builder setSurface(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType surface) Initializes the value for thesurfaceattribute.- Parameters:
surface- The value for surface- Returns:
thisbuilder for use in a chained invocation
-
setMinimumImageCount
Initializes the value for theminimumImageCountattribute.- Parameters:
minimumImageCount- The value for minimumImageCount- Returns:
thisbuilder for use in a chained invocation
-
setImageFormat
Initializes the value for theimageFormatattribute.- Parameters:
imageFormat- The value for imageFormat- Returns:
thisbuilder for use in a chained invocation
-
setImageColorSpace
public final VulkanSwapChainCreateInfo.Builder setImageColorSpace(VulkanColorSpaceKHR imageColorSpace) Initializes the value for theimageColorSpaceattribute.- Parameters:
imageColorSpace- The value for imageColorSpace- Returns:
thisbuilder for use in a chained invocation
-
setImageExtent
Initializes the value for theimageExtentattribute.- Parameters:
imageExtent- The value for imageExtent- Returns:
thisbuilder for use in a chained invocation
-
setImageArrayLayers
Initializes the value for theimageArrayLayersattribute.- Parameters:
imageArrayLayers- The value for imageArrayLayers- Returns:
thisbuilder for use in a chained invocation
-
addImageUsageFlags
Adds one element toimageUsageFlagsset.- Parameters:
element- A imageUsageFlags element- Returns:
thisbuilder for use in a chained invocation
-
addImageUsageFlags
Adds elements toimageUsageFlagsset.- Parameters:
elements- An array of imageUsageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setImageUsageFlags
public final VulkanSwapChainCreateInfo.Builder setImageUsageFlags(Iterable<VulkanImageUsageFlag> elements) Sets or replaces all elements forimageUsageFlagsset.- Parameters:
elements- An iterable of imageUsageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllImageUsageFlags
public final VulkanSwapChainCreateInfo.Builder addAllImageUsageFlags(Iterable<VulkanImageUsageFlag> elements) Adds elements toimageUsageFlagsset.- Parameters:
elements- An iterable of imageUsageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setImageSharingMode
public final VulkanSwapChainCreateInfo.Builder setImageSharingMode(VulkanSharingMode imageSharingMode) Initializes the value for theimageSharingModeattribute.- Parameters:
imageSharingMode- The value for imageSharingMode- Returns:
thisbuilder for use in a chained invocation
-
addQueueFamilyIndices
public final VulkanSwapChainCreateInfo.Builder addQueueFamilyIndices(VulkanQueueFamilyIndex element) Adds one element toqueueFamilyIndiceslist.- Parameters:
element- A queueFamilyIndices element- Returns:
thisbuilder for use in a chained invocation
-
addQueueFamilyIndices
public final VulkanSwapChainCreateInfo.Builder addQueueFamilyIndices(VulkanQueueFamilyIndex... elements) Adds elements toqueueFamilyIndiceslist.- Parameters:
elements- An array of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
setQueueFamilyIndices
public final VulkanSwapChainCreateInfo.Builder setQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Sets or replaces all elements forqueueFamilyIndiceslist.- Parameters:
elements- An iterable of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
addAllQueueFamilyIndices
public final VulkanSwapChainCreateInfo.Builder addAllQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Adds elements toqueueFamilyIndiceslist.- Parameters:
elements- An iterable of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
addPreTransform
public final VulkanSwapChainCreateInfo.Builder addPreTransform(VulkanSurfaceTransformFlagKHR element) Adds one element topreTransformset.- Parameters:
element- A preTransform element- Returns:
thisbuilder for use in a chained invocation
-
addPreTransform
public final VulkanSwapChainCreateInfo.Builder addPreTransform(VulkanSurfaceTransformFlagKHR... elements) Adds elements topreTransformset.- Parameters:
elements- An array of preTransform elements- Returns:
thisbuilder for use in a chained invocation
-
setPreTransform
public final VulkanSwapChainCreateInfo.Builder setPreTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements) Sets or replaces all elements forpreTransformset.- Parameters:
elements- An iterable of preTransform elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPreTransform
public final VulkanSwapChainCreateInfo.Builder addAllPreTransform(Iterable<VulkanSurfaceTransformFlagKHR> elements) Adds elements topreTransformset.- Parameters:
elements- An iterable of preTransform elements- Returns:
thisbuilder for use in a chained invocation
-
addCompositeAlpha
public final VulkanSwapChainCreateInfo.Builder addCompositeAlpha(VulkanCompositeAlphaFlagKHR element) Adds one element tocompositeAlphaset.- Parameters:
element- A compositeAlpha element- Returns:
thisbuilder for use in a chained invocation
-
addCompositeAlpha
public final VulkanSwapChainCreateInfo.Builder addCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements) Adds elements tocompositeAlphaset.- Parameters:
elements- An array of compositeAlpha elements- Returns:
thisbuilder for use in a chained invocation
-
setCompositeAlpha
public final VulkanSwapChainCreateInfo.Builder setCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements) Sets or replaces all elements forcompositeAlphaset.- Parameters:
elements- An iterable of compositeAlpha elements- Returns:
thisbuilder for use in a chained invocation
-
addAllCompositeAlpha
public final VulkanSwapChainCreateInfo.Builder addAllCompositeAlpha(Iterable<VulkanCompositeAlphaFlagKHR> elements) Adds elements tocompositeAlphaset.- Parameters:
elements- An iterable of compositeAlpha elements- Returns:
thisbuilder for use in a chained invocation
-
setPresentMode
Initializes the value for thepresentModeattribute.- Parameters:
presentMode- The value for presentMode- Returns:
thisbuilder for use in a chained invocation
-
setClipped
Initializes the value for theclippedattribute.- Parameters:
clipped- The value for clipped- Returns:
thisbuilder for use in a chained invocation
-
setOldSwapChain
public final VulkanSwapChainCreateInfo.Builder setOldSwapChain(VulkanExtKHRSwapChainType.VulkanKHRSwapChainType oldSwapChain) Initializes the optional valueoldSwapChainto oldSwapChain.- Parameters:
oldSwapChain- The value for oldSwapChain- Returns:
thisbuilder for chained invocation
-
setOldSwapChain
public final VulkanSwapChainCreateInfo.Builder setOldSwapChain(Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain) Initializes the optional valueoldSwapChainto oldSwapChain.- Parameters:
oldSwapChain- The value for oldSwapChain- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanSwapChainCreateInfo.- Returns:
- An immutable instance of VulkanSwapChainCreateInfo
- Throws:
IllegalStateException- if any required attributes are missing
-