Class VulkanImageCreateInfo.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanImageCreateInfo.Builder
- Enclosing class:
VulkanImageCreateInfo
Builds instances of type
VulkanImageCreateInfo.
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 TypeMethodDescriptionaddAllFlags(Iterable<VulkanImageCreateFlag> elements) Adds elements toflagsset.addAllQueueFamilyIndices(Iterable<Integer> elements) Adds elements toqueueFamilyIndiceslist.addAllSamples(Iterable<VulkanSampleCountFlag> elements) Adds elements tosamplesset.addAllUsage(Iterable<VulkanImageUsageFlag> elements) Adds elements tousageset.addFlags(VulkanImageCreateFlag element) Adds one element toflagsset.addFlags(VulkanImageCreateFlag... elements) Adds elements toflagsset.addQueueFamilyIndices(int element) Adds one element toqueueFamilyIndiceslist.addQueueFamilyIndices(int... elements) Adds elements toqueueFamilyIndiceslist.addSamples(VulkanSampleCountFlag element) Adds one element tosamplesset.addSamples(VulkanSampleCountFlag... elements) Adds elements tosamplesset.addUsage(VulkanImageUsageFlag element) Adds one element tousageset.addUsage(VulkanImageUsageFlag... elements) Adds elements tousageset.build()Builds a newVulkanImageCreateInfo.from(VulkanImageCreateInfoType instance) Fill a builder with attribute values from the providedVulkanImageCreateInfoTypeinstance.setArrayLayers(int arrayLayers) Initializes the value for thearrayLayersattribute.setExtent(VulkanExtent3D extent) Initializes the value for theextentattribute.setFlags(Iterable<VulkanImageCreateFlag> elements) Sets or replaces all elements forflagsset.setFormat(VulkanFormat format) Initializes the value for theformatattribute.setImageType(VulkanImageKind imageType) Initializes the value for theimageTypeattribute.setInitialLayout(VulkanImageLayout initialLayout) Initializes the value for theinitialLayoutattribute.setMipLevels(int mipLevels) Initializes the value for themipLevelsattribute.setQueueFamilyIndices(Iterable<Integer> elements) Sets or replaces all elements forqueueFamilyIndiceslist.setSamples(Iterable<VulkanSampleCountFlag> elements) Sets or replaces all elements forsamplesset.setSharingMode(VulkanSharingMode sharingMode) Initializes the value for thesharingModeattribute.setTiling(VulkanImageTiling tiling) Initializes the value for thetilingattribute.setUsage(Iterable<VulkanImageUsageFlag> elements) Sets or replaces all elements forusageset.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanImageCreateInfoTypeinstance. 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
-
addFlags
Adds one element toflagsset.- Parameters:
element- A flags element- Returns:
thisbuilder for use in a chained invocation
-
addFlags
Adds elements toflagsset.- Parameters:
elements- An array of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFlags
Sets or replaces all elements forflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFlags
Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setImageType
Initializes the value for theimageTypeattribute.- Parameters:
imageType- The value for imageType- Returns:
thisbuilder for use in a chained invocation
-
setFormat
Initializes the value for theformatattribute.- Parameters:
format- The value for format- Returns:
thisbuilder for use in a chained invocation
-
setExtent
Initializes the value for theextentattribute.- Parameters:
extent- The value for extent- Returns:
thisbuilder for use in a chained invocation
-
setMipLevels
Initializes the value for themipLevelsattribute.- Parameters:
mipLevels- The value for mipLevels- Returns:
thisbuilder for use in a chained invocation
-
setArrayLayers
Initializes the value for thearrayLayersattribute.- Parameters:
arrayLayers- The value for arrayLayers- Returns:
thisbuilder for use in a chained invocation
-
addSamples
Adds one element tosamplesset.- Parameters:
element- A samples element- Returns:
thisbuilder for use in a chained invocation
-
addSamples
Adds elements tosamplesset.- Parameters:
elements- An array of samples elements- Returns:
thisbuilder for use in a chained invocation
-
setSamples
Sets or replaces all elements forsamplesset.- Parameters:
elements- An iterable of samples elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSamples
Adds elements tosamplesset.- Parameters:
elements- An iterable of samples elements- Returns:
thisbuilder for use in a chained invocation
-
setTiling
Initializes the value for thetilingattribute.- Parameters:
tiling- The value for tiling- Returns:
thisbuilder for use in a chained invocation
-
addUsage
Adds one element tousageset.- Parameters:
element- A usage element- Returns:
thisbuilder for use in a chained invocation
-
addUsage
Adds elements tousageset.- Parameters:
elements- An array of usage elements- Returns:
thisbuilder for use in a chained invocation
-
setUsage
Sets or replaces all elements forusageset.- Parameters:
elements- An iterable of usage elements- Returns:
thisbuilder for use in a chained invocation
-
addAllUsage
Adds elements tousageset.- Parameters:
elements- An iterable of usage elements- Returns:
thisbuilder for use in a chained invocation
-
setSharingMode
Initializes the value for thesharingModeattribute.- Parameters:
sharingMode- The value for sharingMode- Returns:
thisbuilder for use in a chained invocation
-
addQueueFamilyIndices
Adds one element toqueueFamilyIndiceslist.- Parameters:
element- A queueFamilyIndices element- Returns:
thisbuilder for use in a chained invocation
-
addQueueFamilyIndices
Adds elements toqueueFamilyIndiceslist.- Parameters:
elements- An array of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
setQueueFamilyIndices
Sets or replaces all elements forqueueFamilyIndiceslist.- Parameters:
elements- An iterable of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
addAllQueueFamilyIndices
Adds elements toqueueFamilyIndiceslist.- Parameters:
elements- An iterable of queueFamilyIndices elements- Returns:
thisbuilder for use in a chained invocation
-
setInitialLayout
Initializes the value for theinitialLayoutattribute.- Parameters:
initialLayout- The value for initialLayout- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanImageCreateInfo.- Returns:
- An immutable instance of VulkanImageCreateInfo
- Throws:
IllegalStateException- if any required attributes are missing
-