Class VulkanVertexInputBindingDescription.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanVertexInputBindingDescription.Builder
- Enclosing class:
VulkanVertexInputBindingDescription
Builds instances of type
VulkanVertexInputBindingDescription
.
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 TypeMethodDescriptionbuild()
Builds a newVulkanVertexInputBindingDescription
.from
(VulkanVertexInputBindingDescriptionType instance) Fill a builder with attribute values from the providedVulkanVertexInputBindingDescriptionType
instance.setBinding
(int binding) Initializes the value for thebinding
attribute.setInputRate
(VulkanVertexInputRate inputRate) Initializes the value for theinputRate
attribute.setStride
(int stride) Initializes the value for thestride
attribute.
-
Method Details
-
from
public final VulkanVertexInputBindingDescription.Builder from(VulkanVertexInputBindingDescriptionType instance) Fill a builder with attribute values from the providedVulkanVertexInputBindingDescriptionType
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setBinding
Initializes the value for thebinding
attribute.- Parameters:
binding
- The value for binding- Returns:
this
builder for use in a chained invocation
-
setStride
Initializes the value for thestride
attribute.- Parameters:
stride
- The value for stride- Returns:
this
builder for use in a chained invocation
-
setInputRate
public final VulkanVertexInputBindingDescription.Builder setInputRate(VulkanVertexInputRate inputRate) Initializes the value for theinputRate
attribute.- Parameters:
inputRate
- The value for inputRate- Returns:
this
builder for use in a chained invocation
-
build
Builds a newVulkanVertexInputBindingDescription
.- Returns:
- An immutable instance of VulkanVertexInputBindingDescription
- Throws:
IllegalStateException
- if any required attributes are missing
-