Class VulkanBufferImageCopy
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferImageCopy
- All Implemented Interfaces:
VulkanBufferImageCopyType
Structure specifying a buffer ↔ image copy operation.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanBufferImageCopy. -
Method Summary
Modifier and TypeMethodDescriptionintlongintThe bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations.builder()Creates a builder forVulkanBufferImageCopy.static VulkanBufferImageCopycopyOf(VulkanBufferImageCopyType instance) Creates an immutable copy of aVulkanBufferImageCopyTypevalue.booleanThis instance is equal to all instances ofVulkanBufferImageCopythat have equal attribute values.inthashCode()Computes a hash code from attributes:bufferOffset,bufferRowLength,bufferImageHeight,imageSubresource,imageOffset,imageExtent.static VulkanBufferImageCopyof(long bufferOffset, int bufferRowLength, int bufferImageHeight, VulkanImageSubresourceLayers imageSubresource, VulkanOffset3D imageOffset, VulkanExtent3D imageExtent) Construct a new immutableVulkanBufferImageCopyinstance.toString()Prints the immutable valueVulkanBufferImageCopywith attribute values.final VulkanBufferImageCopywithBufferImageHeight(int value) Copy the current immutable object by setting a value for thebufferImageHeightattribute.final VulkanBufferImageCopywithBufferOffset(long value) Copy the current immutable object by setting a value for thebufferOffsetattribute.final VulkanBufferImageCopywithBufferRowLength(int value) Copy the current immutable object by setting a value for thebufferRowLengthattribute.final VulkanBufferImageCopywithImageExtent(VulkanExtent3D value) Copy the current immutable object by setting a value for theimageExtentattribute.final VulkanBufferImageCopywithImageOffset(VulkanOffset3D value) Copy the current immutable object by setting a value for theimageOffsetattribute.final VulkanBufferImageCopyCopy the current immutable object by setting a value for theimageSubresourceattribute.
-
Method Details
-
bufferOffset
public long bufferOffset()- Specified by:
bufferOffsetin interfaceVulkanBufferImageCopyType- Returns:
- The offset in bytes from the start of the buffer object where the image data is copied from or to.
-
bufferRowLength
public int bufferRowLength()The bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent.- Specified by:
bufferRowLengthin interfaceVulkanBufferImageCopyType- Returns:
- The buffer row length
-
bufferImageHeight
public int bufferImageHeight()- Specified by:
bufferImageHeightin interfaceVulkanBufferImageCopyType- Returns:
- The buffer image height
-
imageSubresource
- Specified by:
imageSubresourcein interfaceVulkanBufferImageCopyType- Returns:
- An image specifying the specific image subresources of the image used for the source or destination image data.
-
imageOffset
- Specified by:
imageOffsetin interfaceVulkanBufferImageCopyType- Returns:
- The initial x, y, z offsets in texels of the sub-region of the source or destination image data.
-
imageExtent
- Specified by:
imageExtentin interfaceVulkanBufferImageCopyType- Returns:
- The size in texels of the image to copy in width, height and depth.
-
withBufferOffset
Copy the current immutable object by setting a value for thebufferOffsetattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bufferOffset- Returns:
- A modified copy of the
thisobject
-
withBufferRowLength
Copy the current immutable object by setting a value for thebufferRowLengthattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bufferRowLength- Returns:
- A modified copy of the
thisobject
-
withBufferImageHeight
Copy the current immutable object by setting a value for thebufferImageHeightattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bufferImageHeight- Returns:
- A modified copy of the
thisobject
-
withImageSubresource
Copy the current immutable object by setting a value for theimageSubresourceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imageSubresource- Returns:
- A modified copy of the
thisobject
-
withImageOffset
Copy the current immutable object by setting a value for theimageOffsetattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imageOffset- Returns:
- A modified copy of the
thisobject
-
withImageExtent
Copy the current immutable object by setting a value for theimageExtentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imageExtent- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanBufferImageCopy of(long bufferOffset, int bufferRowLength, int bufferImageHeight, VulkanImageSubresourceLayers imageSubresource, VulkanOffset3D imageOffset, VulkanExtent3D imageExtent) Construct a new immutableVulkanBufferImageCopyinstance.- Parameters:
bufferOffset- The value for thebufferOffsetattributebufferRowLength- The value for thebufferRowLengthattributebufferImageHeight- The value for thebufferImageHeightattributeimageSubresource- The value for theimageSubresourceattributeimageOffset- The value for theimageOffsetattributeimageExtent- The value for theimageExtentattribute- Returns:
- An immutable VulkanBufferImageCopy instance
-
copyOf
Creates an immutable copy of aVulkanBufferImageCopyTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable VulkanBufferImageCopy instance
-
builder
Creates a builder forVulkanBufferImageCopy.VulkanBufferImageCopy.builder() .setBufferOffset(long) // requiredbufferOffset.setBufferRowLength(int) // requiredbufferRowLength.setBufferImageHeight(int) // requiredbufferImageHeight.setImageSubresource(com.io7m.jcoronado.api.VulkanImageSubresourceLayers) // requiredimageSubresource.setImageOffset(com.io7m.jcoronado.api.VulkanOffset3D) // requiredimageOffset.setImageExtent(com.io7m.jcoronado.api.VulkanExtent3D) // requiredimageExtent.build();- Returns:
- A new VulkanBufferImageCopy builder
-