Class VulkanDescriptorSetLayoutBinding.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanDescriptorSetLayoutBinding.Builder
- Enclosing class:
VulkanDescriptorSetLayoutBinding
Builds instances of type
VulkanDescriptorSetLayoutBinding.
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 TypeMethodDescriptionaddAllImmutableSamplers(Iterable<? extends VulkanSamplerType> elements) Adds elements toimmutableSamplerslist.addAllStageFlags(Iterable<VulkanShaderStageFlag> elements) Adds elements tostageFlagsset.addImmutableSamplers(VulkanSamplerType element) Adds one element toimmutableSamplerslist.addImmutableSamplers(VulkanSamplerType... elements) Adds elements toimmutableSamplerslist.addStageFlags(VulkanShaderStageFlag element) Adds one element tostageFlagsset.addStageFlags(VulkanShaderStageFlag... elements) Adds elements tostageFlagsset.build()Builds a newVulkanDescriptorSetLayoutBinding.from(VulkanDescriptorSetLayoutBindingType instance) Fill a builder with attribute values from the providedVulkanDescriptorSetLayoutBindingTypeinstance.setBinding(int binding) Initializes the value for thebindingattribute.setDescriptorCount(int descriptorCount) Initializes the value for thedescriptorCountattribute.setDescriptorType(VulkanDescriptorType descriptorType) Initializes the value for thedescriptorTypeattribute.setImmutableSamplers(Iterable<? extends VulkanSamplerType> elements) Sets or replaces all elements forimmutableSamplerslist.setStageFlags(Iterable<VulkanShaderStageFlag> elements) Sets or replaces all elements forstageFlagsset.
-
Method Details
-
from
public final VulkanDescriptorSetLayoutBinding.Builder from(VulkanDescriptorSetLayoutBindingType instance) Fill a builder with attribute values from the providedVulkanDescriptorSetLayoutBindingTypeinstance. 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
-
setBinding
Initializes the value for thebindingattribute.- Parameters:
binding- The value for binding- Returns:
thisbuilder for use in a chained invocation
-
setDescriptorType
public final VulkanDescriptorSetLayoutBinding.Builder setDescriptorType(VulkanDescriptorType descriptorType) Initializes the value for thedescriptorTypeattribute.- Parameters:
descriptorType- The value for descriptorType- Returns:
thisbuilder for use in a chained invocation
-
setDescriptorCount
Initializes the value for thedescriptorCountattribute.If not set, this attribute will have a default value as returned by the initializer of
descriptorCount.- Parameters:
descriptorCount- The value for descriptorCount- Returns:
thisbuilder for use in a chained invocation
-
addStageFlags
Adds one element tostageFlagsset.- Parameters:
element- A stageFlags element- Returns:
thisbuilder for use in a chained invocation
-
addStageFlags
public final VulkanDescriptorSetLayoutBinding.Builder addStageFlags(VulkanShaderStageFlag... elements) Adds elements tostageFlagsset.- Parameters:
elements- An array of stageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setStageFlags
public final VulkanDescriptorSetLayoutBinding.Builder setStageFlags(Iterable<VulkanShaderStageFlag> elements) Sets or replaces all elements forstageFlagsset.- Parameters:
elements- An iterable of stageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllStageFlags
public final VulkanDescriptorSetLayoutBinding.Builder addAllStageFlags(Iterable<VulkanShaderStageFlag> elements) Adds elements tostageFlagsset.- Parameters:
elements- An iterable of stageFlags elements- Returns:
thisbuilder for use in a chained invocation
-
addImmutableSamplers
public final VulkanDescriptorSetLayoutBinding.Builder addImmutableSamplers(VulkanSamplerType element) Adds one element toimmutableSamplerslist.- Parameters:
element- A immutableSamplers element- Returns:
thisbuilder for use in a chained invocation
-
addImmutableSamplers
public final VulkanDescriptorSetLayoutBinding.Builder addImmutableSamplers(VulkanSamplerType... elements) Adds elements toimmutableSamplerslist.- Parameters:
elements- An array of immutableSamplers elements- Returns:
thisbuilder for use in a chained invocation
-
setImmutableSamplers
public final VulkanDescriptorSetLayoutBinding.Builder setImmutableSamplers(Iterable<? extends VulkanSamplerType> elements) Sets or replaces all elements forimmutableSamplerslist.- Parameters:
elements- An iterable of immutableSamplers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllImmutableSamplers
public final VulkanDescriptorSetLayoutBinding.Builder addAllImmutableSamplers(Iterable<? extends VulkanSamplerType> elements) Adds elements toimmutableSamplerslist.- Parameters:
elements- An iterable of immutableSamplers elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanDescriptorSetLayoutBinding.- Returns:
- An immutable instance of VulkanDescriptorSetLayoutBinding
- Throws:
IllegalStateException- if any required attributes are missing
-