Class VulkanSubresourceLayout
java.lang.Object
com.io7m.jcoronado.api.VulkanSubresourceLayout
- All Implemented Interfaces:
VulkanSubresourceLayoutType
Structure specifying subresource layout.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanSubresourceLayout. -
Method Summary
Modifier and TypeMethodDescriptionlongbuilder()Creates a builder forVulkanSubresourceLayout.static VulkanSubresourceLayoutcopyOf(VulkanSubresourceLayoutType instance) Creates an immutable copy of aVulkanSubresourceLayoutTypevalue.longbooleanThis instance is equal to all instances ofVulkanSubresourceLayoutthat have equal attribute values.inthashCode()Computes a hash code from attributes:offset,size,rowPitch,arrayPitch,depthPitch.longoffset()longrowPitch()longsize()toString()Prints the immutable valueVulkanSubresourceLayoutwith attribute values.final VulkanSubresourceLayoutwithArrayPitch(long value) Copy the current immutable object by setting a value for thearrayPitchattribute.final VulkanSubresourceLayoutwithDepthPitch(long value) Copy the current immutable object by setting a value for thedepthPitchattribute.final VulkanSubresourceLayoutwithOffset(long value) Copy the current immutable object by setting a value for theoffsetattribute.final VulkanSubresourceLayoutwithRowPitch(long value) Copy the current immutable object by setting a value for therowPitchattribute.final VulkanSubresourceLayoutwithSize(long value) Copy the current immutable object by setting a value for thesizeattribute.
-
Method Details
-
offset
public long offset()- Specified by:
offsetin interfaceVulkanSubresourceLayoutType- Returns:
- The byte offset from the start of the image or the plane where the image subresource begins.
-
size
public long size()- Specified by:
sizein interfaceVulkanSubresourceLayoutType- Returns:
- The size in bytes of the image subresource. size includes any extra memory that is required based on rowPitch.
-
rowPitch
public long rowPitch()- Specified by:
rowPitchin interfaceVulkanSubresourceLayoutType- Returns:
- The number of bytes between each row of texels in an image.
-
arrayPitch
public long arrayPitch()- Specified by:
arrayPitchin interfaceVulkanSubresourceLayoutType- Returns:
- The number of bytes between each array layer of an image.
-
depthPitch
public long depthPitch()- Specified by:
depthPitchin interfaceVulkanSubresourceLayoutType- Returns:
- The number of bytes between each slice of 3D image.
-
withOffset
Copy the current immutable object by setting a value for theoffsetattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for offset- Returns:
- A modified copy or the
thisobject
-
withSize
Copy the current immutable object by setting a value for thesizeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for size- Returns:
- A modified copy or the
thisobject
-
withRowPitch
Copy the current immutable object by setting a value for therowPitchattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rowPitch- Returns:
- A modified copy or the
thisobject
-
withArrayPitch
Copy the current immutable object by setting a value for thearrayPitchattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for arrayPitch- Returns:
- A modified copy or the
thisobject
-
withDepthPitch
Copy the current immutable object by setting a value for thedepthPitchattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthPitch- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVulkanSubresourceLayoutTypevalue. 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 VulkanSubresourceLayout instance
-
builder
Creates a builder forVulkanSubresourceLayout.VulkanSubresourceLayout.builder() .setOffset(long) // optional
offset.setSize(long) // optionalsize.setRowPitch(long) // optionalrowPitch.setArrayPitch(long) // optionalarrayPitch.setDepthPitch(long) // optionaldepthPitch.build();- Returns:
- A new VulkanSubresourceLayout builder
-