Class VulkanSwapChainCreateInfo.Builder
- java.lang.Object
-
- com.io7m.jcoronado.extensions.khr_swapchain.api.VulkanSwapChainCreateInfo.Builder
-
- Enclosing class:
- VulkanSwapChainCreateInfo
public static final class VulkanSwapChainCreateInfo.Builder extends java.lang.Object
Builds instances of typeVulkanSwapChainCreateInfo
. Initialize attributes and then invoke thebuild()
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
-
-
-
Method Detail
-
from
public final VulkanSwapChainCreateInfo.Builder from(VulkanSwapChainCreateInfoType instance)
Fill a builder with attribute values from the providedVulkanSwapChainCreateInfoType
instance. 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:
this
builder for use in a chained invocation
-
setSurface
public final VulkanSwapChainCreateInfo.Builder setSurface(VulkanExtKHRSurfaceType.VulkanKHRSurfaceType surface)
Initializes the value for thesurface
attribute.- Parameters:
surface
- The value for surface- Returns:
this
builder for use in a chained invocation
-
setMinimumImageCount
public final VulkanSwapChainCreateInfo.Builder setMinimumImageCount(int minimumImageCount)
Initializes the value for theminimumImageCount
attribute.- Parameters:
minimumImageCount
- The value for minimumImageCount- Returns:
this
builder for use in a chained invocation
-
setImageFormat
public final VulkanSwapChainCreateInfo.Builder setImageFormat(VulkanFormat imageFormat)
Initializes the value for theimageFormat
attribute.- Parameters:
imageFormat
- The value for imageFormat- Returns:
this
builder for use in a chained invocation
-
setImageColorSpace
public final VulkanSwapChainCreateInfo.Builder setImageColorSpace(VulkanColorSpaceKHR imageColorSpace)
Initializes the value for theimageColorSpace
attribute.- Parameters:
imageColorSpace
- The value for imageColorSpace- Returns:
this
builder for use in a chained invocation
-
setImageExtent
public final VulkanSwapChainCreateInfo.Builder setImageExtent(VulkanExtent2D imageExtent)
Initializes the value for theimageExtent
attribute.- Parameters:
imageExtent
- The value for imageExtent- Returns:
this
builder for use in a chained invocation
-
setImageArrayLayers
public final VulkanSwapChainCreateInfo.Builder setImageArrayLayers(int imageArrayLayers)
Initializes the value for theimageArrayLayers
attribute.- Parameters:
imageArrayLayers
- The value for imageArrayLayers- Returns:
this
builder for use in a chained invocation
-
addImageUsageFlags
public final VulkanSwapChainCreateInfo.Builder addImageUsageFlags(VulkanImageUsageFlag element)
Adds one element toimageUsageFlags
set.- Parameters:
element
- A imageUsageFlags element- Returns:
this
builder for use in a chained invocation
-
addImageUsageFlags
public final VulkanSwapChainCreateInfo.Builder addImageUsageFlags(VulkanImageUsageFlag... elements)
Adds elements toimageUsageFlags
set.- Parameters:
elements
- An array of imageUsageFlags elements- Returns:
this
builder for use in a chained invocation
-
setImageUsageFlags
public final VulkanSwapChainCreateInfo.Builder setImageUsageFlags(java.lang.Iterable<VulkanImageUsageFlag> elements)
Sets or replaces all elements forimageUsageFlags
set.- Parameters:
elements
- An iterable of imageUsageFlags elements- Returns:
this
builder for use in a chained invocation
-
addAllImageUsageFlags
public final VulkanSwapChainCreateInfo.Builder addAllImageUsageFlags(java.lang.Iterable<VulkanImageUsageFlag> elements)
Adds elements toimageUsageFlags
set.- Parameters:
elements
- An iterable of imageUsageFlags elements- Returns:
this
builder for use in a chained invocation
-
setImageSharingMode
public final VulkanSwapChainCreateInfo.Builder setImageSharingMode(VulkanSharingMode imageSharingMode)
Initializes the value for theimageSharingMode
attribute.- Parameters:
imageSharingMode
- The value for imageSharingMode- Returns:
this
builder for use in a chained invocation
-
addQueueFamilyIndices
public final VulkanSwapChainCreateInfo.Builder addQueueFamilyIndices(int element)
Adds one element toqueueFamilyIndices
list.- Parameters:
element
- A queueFamilyIndices element- Returns:
this
builder for use in a chained invocation
-
addQueueFamilyIndices
public final VulkanSwapChainCreateInfo.Builder addQueueFamilyIndices(int... elements)
Adds elements toqueueFamilyIndices
list.- Parameters:
elements
- An array of queueFamilyIndices elements- Returns:
this
builder for use in a chained invocation
-
setQueueFamilyIndices
public final VulkanSwapChainCreateInfo.Builder setQueueFamilyIndices(java.lang.Iterable<java.lang.Integer> elements)
Sets or replaces all elements forqueueFamilyIndices
list.- Parameters:
elements
- An iterable of queueFamilyIndices elements- Returns:
this
builder for use in a chained invocation
-
addAllQueueFamilyIndices
public final VulkanSwapChainCreateInfo.Builder addAllQueueFamilyIndices(java.lang.Iterable<java.lang.Integer> elements)
Adds elements toqueueFamilyIndices
list.- Parameters:
elements
- An iterable of queueFamilyIndices elements- Returns:
this
builder for use in a chained invocation
-
addPreTransform
public final VulkanSwapChainCreateInfo.Builder addPreTransform(VulkanSurfaceTransformFlagKHR element)
Adds one element topreTransform
set.- Parameters:
element
- A preTransform element- Returns:
this
builder for use in a chained invocation
-
addPreTransform
public final VulkanSwapChainCreateInfo.Builder addPreTransform(VulkanSurfaceTransformFlagKHR... elements)
Adds elements topreTransform
set.- Parameters:
elements
- An array of preTransform elements- Returns:
this
builder for use in a chained invocation
-
setPreTransform
public final VulkanSwapChainCreateInfo.Builder setPreTransform(java.lang.Iterable<VulkanSurfaceTransformFlagKHR> elements)
Sets or replaces all elements forpreTransform
set.- Parameters:
elements
- An iterable of preTransform elements- Returns:
this
builder for use in a chained invocation
-
addAllPreTransform
public final VulkanSwapChainCreateInfo.Builder addAllPreTransform(java.lang.Iterable<VulkanSurfaceTransformFlagKHR> elements)
Adds elements topreTransform
set.- Parameters:
elements
- An iterable of preTransform elements- Returns:
this
builder for use in a chained invocation
-
addCompositeAlpha
public final VulkanSwapChainCreateInfo.Builder addCompositeAlpha(VulkanCompositeAlphaFlagKHR element)
Adds one element tocompositeAlpha
set.- Parameters:
element
- A compositeAlpha element- Returns:
this
builder for use in a chained invocation
-
addCompositeAlpha
public final VulkanSwapChainCreateInfo.Builder addCompositeAlpha(VulkanCompositeAlphaFlagKHR... elements)
Adds elements tocompositeAlpha
set.- Parameters:
elements
- An array of compositeAlpha elements- Returns:
this
builder for use in a chained invocation
-
setCompositeAlpha
public final VulkanSwapChainCreateInfo.Builder setCompositeAlpha(java.lang.Iterable<VulkanCompositeAlphaFlagKHR> elements)
Sets or replaces all elements forcompositeAlpha
set.- Parameters:
elements
- An iterable of compositeAlpha elements- Returns:
this
builder for use in a chained invocation
-
addAllCompositeAlpha
public final VulkanSwapChainCreateInfo.Builder addAllCompositeAlpha(java.lang.Iterable<VulkanCompositeAlphaFlagKHR> elements)
Adds elements tocompositeAlpha
set.- Parameters:
elements
- An iterable of compositeAlpha elements- Returns:
this
builder for use in a chained invocation
-
setPresentMode
public final VulkanSwapChainCreateInfo.Builder setPresentMode(VulkanPresentModeKHR presentMode)
Initializes the value for thepresentMode
attribute.- Parameters:
presentMode
- The value for presentMode- Returns:
this
builder for use in a chained invocation
-
setClipped
public final VulkanSwapChainCreateInfo.Builder setClipped(boolean clipped)
Initializes the value for theclipped
attribute.- Parameters:
clipped
- The value for clipped- Returns:
this
builder for use in a chained invocation
-
setOldSwapChain
public final VulkanSwapChainCreateInfo.Builder setOldSwapChain(VulkanExtKHRSwapChainType.VulkanKHRSwapChainType oldSwapChain)
Initializes the optional valueoldSwapChain
to oldSwapChain.- Parameters:
oldSwapChain
- The value for oldSwapChain- Returns:
this
builder for chained invocation
-
setOldSwapChain
public final VulkanSwapChainCreateInfo.Builder setOldSwapChain(java.util.Optional<? extends VulkanExtKHRSwapChainType.VulkanKHRSwapChainType> oldSwapChain)
Initializes the optional valueoldSwapChain
to oldSwapChain.- Parameters:
oldSwapChain
- The value for oldSwapChain- Returns:
this
builder for use in a chained invocation
-
build
public VulkanSwapChainCreateInfo build()
Builds a newVulkanSwapChainCreateInfo
.- Returns:
- An immutable instance of VulkanSwapChainCreateInfo
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-