Class VulkanBufferImageCopy.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferImageCopy.Builder
- Enclosing class:
VulkanBufferImageCopy
Builds instances of type
VulkanBufferImageCopy.
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 newVulkanBufferImageCopy.from(VulkanBufferImageCopyType instance) Fill a builder with attribute values from the providedVulkanBufferImageCopyTypeinstance.setBufferImageHeight(int bufferImageHeight) Initializes the value for thebufferImageHeightattribute.setBufferOffset(long bufferOffset) Initializes the value for thebufferOffsetattribute.setBufferRowLength(int bufferRowLength) Initializes the value for thebufferRowLengthattribute.setImageExtent(VulkanExtent3D imageExtent) Initializes the value for theimageExtentattribute.setImageOffset(VulkanOffset3D imageOffset) Initializes the value for theimageOffsetattribute.setImageSubresource(VulkanImageSubresourceLayers imageSubresource) Initializes the value for theimageSubresourceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanBufferImageCopyTypeinstance. 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:
thisbuilder for use in a chained invocation
-
setBufferOffset
Initializes the value for thebufferOffsetattribute.- Parameters:
bufferOffset- The value for bufferOffset- Returns:
thisbuilder for use in a chained invocation
-
setBufferRowLength
Initializes the value for thebufferRowLengthattribute.- Parameters:
bufferRowLength- The value for bufferRowLength- Returns:
thisbuilder for use in a chained invocation
-
setBufferImageHeight
Initializes the value for thebufferImageHeightattribute.- Parameters:
bufferImageHeight- The value for bufferImageHeight- Returns:
thisbuilder for use in a chained invocation
-
setImageSubresource
public final VulkanBufferImageCopy.Builder setImageSubresource(VulkanImageSubresourceLayers imageSubresource) Initializes the value for theimageSubresourceattribute.- Parameters:
imageSubresource- The value for imageSubresource- Returns:
thisbuilder for use in a chained invocation
-
setImageOffset
Initializes the value for theimageOffsetattribute.- Parameters:
imageOffset- The value for imageOffset- Returns:
thisbuilder for use in a chained invocation
-
setImageExtent
Initializes the value for theimageExtentattribute.- Parameters:
imageExtent- The value for imageExtent- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanBufferImageCopy.- Returns:
- An immutable instance of VulkanBufferImageCopy
- Throws:
IllegalStateException- if any required attributes are missing
-