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 tobufferInfos
list.addAllImageInfos
(Iterable<? extends VulkanDescriptorImageInfo> elements) Adds elements toimageInfos
list.addAllTexelBufferViews
(Iterable<? extends VulkanBufferViewType> elements) Adds elements totexelBufferViews
list.addBufferInfos
(VulkanDescriptorBufferInfo element) Adds one element tobufferInfos
list.addBufferInfos
(VulkanDescriptorBufferInfo... elements) Adds elements tobufferInfos
list.addImageInfos
(VulkanDescriptorImageInfo element) Adds one element toimageInfos
list.addImageInfos
(VulkanDescriptorImageInfo... elements) Adds elements toimageInfos
list.addTexelBufferViews
(VulkanBufferViewType element) Adds one element totexelBufferViews
list.addTexelBufferViews
(VulkanBufferViewType... elements) Adds elements totexelBufferViews
list.build()
Builds a newVulkanWriteDescriptorSet
.from
(VulkanWriteDescriptorSetType instance) Fill a builder with attribute values from the providedVulkanWriteDescriptorSetType
instance.setBufferInfos
(Iterable<? extends VulkanDescriptorBufferInfo> elements) Sets or replaces all elements forbufferInfos
list.setDescriptorCount
(int descriptorCount) Initializes the value for thedescriptorCount
attribute.setDescriptorType
(VulkanDescriptorType descriptorType) Initializes the value for thedescriptorType
attribute.setDestinationArrayElement
(int destinationArrayElement) Initializes the value for thedestinationArrayElement
attribute.setDestinationBinding
(int destinationBinding) Initializes the value for thedestinationBinding
attribute.setDestinationSet
(VulkanDescriptorSetType destinationSet) Initializes the value for thedestinationSet
attribute.setImageInfos
(Iterable<? extends VulkanDescriptorImageInfo> elements) Sets or replaces all elements forimageInfos
list.setTexelBufferViews
(Iterable<? extends VulkanBufferViewType> elements) Sets or replaces all elements fortexelBufferViews
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanWriteDescriptorSetType
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
-
setDestinationSet
public final VulkanWriteDescriptorSet.Builder setDestinationSet(VulkanDescriptorSetType destinationSet) Initializes the value for thedestinationSet
attribute.- Parameters:
destinationSet
- The value for destinationSet- Returns:
this
builder for use in a chained invocation
-
setDestinationBinding
Initializes the value for thedestinationBinding
attribute.- Parameters:
destinationBinding
- The value for destinationBinding- Returns:
this
builder for use in a chained invocation
-
setDestinationArrayElement
public final VulkanWriteDescriptorSet.Builder setDestinationArrayElement(int destinationArrayElement) Initializes the value for thedestinationArrayElement
attribute.If not set, this attribute will have a default value as returned by the initializer of
destinationArrayElement
.- Parameters:
destinationArrayElement
- The value for destinationArrayElement- Returns:
this
builder for use in a chained invocation
-
setDescriptorCount
Initializes the value for thedescriptorCount
attribute.- Parameters:
descriptorCount
- The value for descriptorCount- Returns:
this
builder for use in a chained invocation
-
setDescriptorType
public final VulkanWriteDescriptorSet.Builder setDescriptorType(VulkanDescriptorType descriptorType) Initializes the value for thedescriptorType
attribute.- Parameters:
descriptorType
- The value for descriptorType- Returns:
this
builder for use in a chained invocation
-
addImageInfos
Adds one element toimageInfos
list.- Parameters:
element
- A imageInfos element- Returns:
this
builder for use in a chained invocation
-
addImageInfos
Adds elements toimageInfos
list.- Parameters:
elements
- An array of imageInfos elements- Returns:
this
builder for use in a chained invocation
-
setImageInfos
public final VulkanWriteDescriptorSet.Builder setImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements) Sets or replaces all elements forimageInfos
list.- Parameters:
elements
- An iterable of imageInfos elements- Returns:
this
builder for use in a chained invocation
-
addAllImageInfos
public final VulkanWriteDescriptorSet.Builder addAllImageInfos(Iterable<? extends VulkanDescriptorImageInfo> elements) Adds elements toimageInfos
list.- Parameters:
elements
- An iterable of imageInfos elements- Returns:
this
builder for use in a chained invocation
-
addBufferInfos
Adds one element tobufferInfos
list.- Parameters:
element
- A bufferInfos element- Returns:
this
builder for use in a chained invocation
-
addBufferInfos
public final VulkanWriteDescriptorSet.Builder addBufferInfos(VulkanDescriptorBufferInfo... elements) Adds elements tobufferInfos
list.- Parameters:
elements
- An array of bufferInfos elements- Returns:
this
builder for use in a chained invocation
-
setBufferInfos
public final VulkanWriteDescriptorSet.Builder setBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements) Sets or replaces all elements forbufferInfos
list.- Parameters:
elements
- An iterable of bufferInfos elements- Returns:
this
builder for use in a chained invocation
-
addAllBufferInfos
public final VulkanWriteDescriptorSet.Builder addAllBufferInfos(Iterable<? extends VulkanDescriptorBufferInfo> elements) Adds elements tobufferInfos
list.- Parameters:
elements
- An iterable of bufferInfos elements- Returns:
this
builder for use in a chained invocation
-
addTexelBufferViews
Adds one element totexelBufferViews
list.- Parameters:
element
- A texelBufferViews element- Returns:
this
builder for use in a chained invocation
-
addTexelBufferViews
Adds elements totexelBufferViews
list.- Parameters:
elements
- An array of texelBufferViews elements- Returns:
this
builder for use in a chained invocation
-
setTexelBufferViews
public final VulkanWriteDescriptorSet.Builder setTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements) Sets or replaces all elements fortexelBufferViews
list.- Parameters:
elements
- An iterable of texelBufferViews elements- Returns:
this
builder for use in a chained invocation
-
addAllTexelBufferViews
public final VulkanWriteDescriptorSet.Builder addAllTexelBufferViews(Iterable<? extends VulkanBufferViewType> elements) Adds elements totexelBufferViews
list.- Parameters:
elements
- An iterable of texelBufferViews elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newVulkanWriteDescriptorSet
.- Returns:
- An immutable instance of VulkanWriteDescriptorSet
- Throws:
IllegalStateException
- if any required attributes are missing
-