Class VulkanWriteDescriptorSet.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanWriteDescriptorSet.Builder
- Enclosing class:
VulkanWriteDescriptorSet
Builds instances of type
VulkanWriteDescriptorSet.
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 TypeMethodDescriptionaddAllBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements) Adds elements tobufferInfoslist.addAllImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements) Adds elements toimageInfoslist.addAllTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements) Adds elements totexelBufferViewslist.addBufferInfos(VulkanDescriptorBufferInfo element) Adds one element tobufferInfoslist.addBufferInfos(VulkanDescriptorBufferInfo... elements) Adds elements tobufferInfoslist.addImageInfos(VulkanDescriptorImageInfo element) Adds one element toimageInfoslist.addImageInfos(VulkanDescriptorImageInfo... elements) Adds elements toimageInfoslist.addTexelBufferViews(VulkanBufferViewType element) Adds one element totexelBufferViewslist.addTexelBufferViews(VulkanBufferViewType... elements) Adds elements totexelBufferViewslist.build()Builds a newVulkanWriteDescriptorSet.from(VulkanWriteDescriptorSetType instance) Fill a builder with attribute values from the providedVulkanWriteDescriptorSetTypeinstance.setBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements) Sets or replaces all elements forbufferInfoslist.setDescriptorCount(int descriptorCount) Initializes the value for thedescriptorCountattribute.setDescriptorType(VulkanDescriptorType descriptorType) Initializes the value for thedescriptorTypeattribute.setDestinationArrayElement(int destinationArrayElement) Initializes the value for thedestinationArrayElementattribute.setDestinationBinding(int destinationBinding) Initializes the value for thedestinationBindingattribute.setDestinationSet(VulkanDescriptorSetType destinationSet) Initializes the value for thedestinationSetattribute.setImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements) Sets or replaces all elements forimageInfoslist.setTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements) Sets or replaces all elements fortexelBufferViewslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanWriteDescriptorSetTypeinstance. 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
-
setDestinationSet
public final VulkanWriteDescriptorSet.Builder setDestinationSet(VulkanDescriptorSetType destinationSet) Initializes the value for thedestinationSetattribute.- Parameters:
destinationSet- The value for destinationSet- Returns:
thisbuilder for use in a chained invocation
-
setDestinationBinding
Initializes the value for thedestinationBindingattribute.- Parameters:
destinationBinding- The value for destinationBinding- Returns:
thisbuilder for use in a chained invocation
-
setDestinationArrayElement
public final VulkanWriteDescriptorSet.Builder setDestinationArrayElement(int destinationArrayElement) Initializes the value for thedestinationArrayElementattribute.If not set, this attribute will have a default value as returned by the initializer of
destinationArrayElement.- Parameters:
destinationArrayElement- The value for destinationArrayElement- Returns:
thisbuilder for use in a chained invocation
-
setDescriptorCount
Initializes the value for thedescriptorCountattribute.- Parameters:
descriptorCount- The value for descriptorCount- Returns:
thisbuilder for use in a chained invocation
-
setDescriptorType
public final VulkanWriteDescriptorSet.Builder setDescriptorType(VulkanDescriptorType descriptorType) Initializes the value for thedescriptorTypeattribute.- Parameters:
descriptorType- The value for descriptorType- Returns:
thisbuilder for use in a chained invocation
-
addImageInfos
Adds one element toimageInfoslist.- Parameters:
element- A imageInfos element- Returns:
thisbuilder for use in a chained invocation
-
addImageInfos
Adds elements toimageInfoslist.- Parameters:
elements- An array of imageInfos elements- Returns:
thisbuilder for use in a chained invocation
-
setImageInfos
public final VulkanWriteDescriptorSet.Builder setImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements) Sets or replaces all elements forimageInfoslist.- Parameters:
elements- An iterable of imageInfos elements- Returns:
thisbuilder for use in a chained invocation
-
addAllImageInfos
public final VulkanWriteDescriptorSet.Builder addAllImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements) Adds elements toimageInfoslist.- Parameters:
elements- An iterable of imageInfos elements- Returns:
thisbuilder for use in a chained invocation
-
addBufferInfos
Adds one element tobufferInfoslist.- Parameters:
element- A bufferInfos element- Returns:
thisbuilder for use in a chained invocation
-
addBufferInfos
public final VulkanWriteDescriptorSet.Builder addBufferInfos(VulkanDescriptorBufferInfo... elements) Adds elements tobufferInfoslist.- Parameters:
elements- An array of bufferInfos elements- Returns:
thisbuilder for use in a chained invocation
-
setBufferInfos
public final VulkanWriteDescriptorSet.Builder setBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements) Sets or replaces all elements forbufferInfoslist.- Parameters:
elements- An iterable of bufferInfos elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBufferInfos
public final VulkanWriteDescriptorSet.Builder addAllBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements) Adds elements tobufferInfoslist.- Parameters:
elements- An iterable of bufferInfos elements- Returns:
thisbuilder for use in a chained invocation
-
addTexelBufferViews
Adds one element totexelBufferViewslist.- Parameters:
element- A texelBufferViews element- Returns:
thisbuilder for use in a chained invocation
-
addTexelBufferViews
Adds elements totexelBufferViewslist.- Parameters:
elements- An array of texelBufferViews elements- Returns:
thisbuilder for use in a chained invocation
-
setTexelBufferViews
public final VulkanWriteDescriptorSet.Builder setTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements) Sets or replaces all elements fortexelBufferViewslist.- Parameters:
elements- An iterable of texelBufferViews elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTexelBufferViews
public final VulkanWriteDescriptorSet.Builder addAllTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements) Adds elements totexelBufferViewslist.- Parameters:
elements- An iterable of texelBufferViews elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanWriteDescriptorSet.- Returns:
- An immutable instance of VulkanWriteDescriptorSet
- Throws:
IllegalStateException- if any required attributes are missing
-