Class VulkanBufferImageCopy.Builder

java.lang.Object
com.io7m.jcoronado.api.VulkanBufferImageCopy.Builder
Enclosing class:
VulkanBufferImageCopy

public static final class VulkanBufferImageCopy.Builder extends Object
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 Details

    • from

      Fill a builder with attribute values from the provided VulkanBufferImageCopyType 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
    • setBufferOffset

      public final VulkanBufferImageCopy.Builder setBufferOffset(long bufferOffset)
      Initializes the value for the bufferOffset attribute.

      If not set, this attribute will have a default value as returned by the initializer of bufferOffset.

      Parameters:
      bufferOffset - The value for bufferOffset
      Returns:
      this builder for use in a chained invocation
    • setBufferRowLength

      public final VulkanBufferImageCopy.Builder setBufferRowLength(int bufferRowLength)
      Initializes the value for the bufferRowLength attribute.

      If not set, this attribute will have a default value as returned by the initializer of bufferRowLength.

      Parameters:
      bufferRowLength - The value for bufferRowLength
      Returns:
      this builder for use in a chained invocation
    • setBufferImageHeight

      public final VulkanBufferImageCopy.Builder setBufferImageHeight(int bufferImageHeight)
      Initializes the value for the bufferImageHeight attribute.

      If not set, this attribute will have a default value as returned by the initializer of bufferImageHeight.

      Parameters:
      bufferImageHeight - The value for bufferImageHeight
      Returns:
      this builder for use in a chained invocation
    • setImageSubresource

      public final VulkanBufferImageCopy.Builder setImageSubresource(VulkanImageSubresourceLayers imageSubresource)
      Initializes the value for the imageSubresource attribute.
      Parameters:
      imageSubresource - The value for imageSubresource
      Returns:
      this builder for use in a chained invocation
    • setImageOffset

      public final VulkanBufferImageCopy.Builder setImageOffset(VulkanOffset3D imageOffset)
      Initializes the value for the imageOffset attribute.

      If not set, this attribute will have a default value as returned by the initializer of imageOffset.

      Parameters:
      imageOffset - The value for imageOffset
      Returns:
      this builder for use in a chained invocation
    • setImageExtent

      public final VulkanBufferImageCopy.Builder setImageExtent(VulkanExtent3D imageExtent)
      Initializes the value for the imageExtent attribute.

      If not set, this attribute will have a default value as returned by the initializer of imageExtent.

      Parameters:
      imageExtent - The value for imageExtent
      Returns:
      this builder for use in a chained invocation
    • build

      public VulkanBufferImageCopy build()
      Builds a new VulkanBufferImageCopy.
      Returns:
      An immutable instance of VulkanBufferImageCopy
      Throws:
      IllegalStateException - if any required attributes are missing