Class VulkanBufferViewCreateInfo
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferViewCreateInfo
- All Implemented Interfaces:
VulkanBufferViewCreateInfoType
public final class VulkanBufferViewCreateInfo
extends Object
implements VulkanBufferViewCreateInfoType
Information required to create a buffer.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanBufferViewCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuffer()builder()Creates a builder forVulkanBufferViewCreateInfo.static VulkanBufferViewCreateInfocopyOf(VulkanBufferViewCreateInfoType instance) Creates an immutable copy of aVulkanBufferViewCreateInfoTypevalue.booleanThis instance is equal to all instances ofVulkanBufferViewCreateInfothat have equal attribute values.flags()format()inthashCode()Computes a hash code from attributes:flags,buffer,format,offset,range.static VulkanBufferViewCreateInfoof(Iterable<VulkanBufferViewCreateFlag> flags, VulkanBufferType buffer, VulkanFormat format, long offset, long range) Construct a new immutableVulkanBufferViewCreateInfoinstance.static VulkanBufferViewCreateInfoof(Set<VulkanBufferViewCreateFlag> flags, VulkanBufferType buffer, VulkanFormat format, long offset, long range) Construct a new immutableVulkanBufferViewCreateInfoinstance.longoffset()longrange()toString()Prints the immutable valueVulkanBufferViewCreateInfowith attribute values.withBuffer(VulkanBufferType value) Copy the current immutable object by setting a value for thebufferattribute.withFlags(VulkanBufferViewCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.withFlags(Iterable<VulkanBufferViewCreateFlag> elements) Copy the current immutable object with elements that replace the content offlags.withFormat(VulkanFormat value) Copy the current immutable object by setting a value for theformatattribute.withOffset(long value) Copy the current immutable object by setting a value for theoffsetattribute.withRange(long value) Copy the current immutable object by setting a value for therangeattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVulkanBufferViewCreateInfoType- Returns:
- A set of flags specifying additional parameters of the buffer view.
-
buffer
- Specified by:
bufferin interfaceVulkanBufferViewCreateInfoType- Returns:
- The buffer on which the view will be created
-
format
- Specified by:
formatin interfaceVulkanBufferViewCreateInfoType- Returns:
- The format of the data elements in the buffer
-
offset
public long offset()- Specified by:
offsetin interfaceVulkanBufferViewCreateInfoType- Returns:
- An offset in bytes from the base address of the buffer. Accesses to the buffer view from shaders use addressing that is relative to this starting offset.
-
range
public long range()- Specified by:
rangein interfaceVulkanBufferViewCreateInfoType- Returns:
- A size in bytes of the buffer view. If range is equal to VK_WHOLE_SIZE, the range from offset to the end of the buffer is used. If VK_WHOLE_SIZE is used and the remaining size of the buffer is not a multiple of the texel block size of format, the nearest smaller multiple is used.
-
withFlags
Copy the current immutable object with elements that replace the content offlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFlags
Copy the current immutable object with elements that replace the content offlags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of flags elements to set- Returns:
- A modified copy of
thisobject
-
withBuffer
Copy the current immutable object by setting a value for thebufferattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for buffer- Returns:
- A modified copy of the
thisobject
-
withFormat
Copy the current immutable object by setting a value for theformatattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for format- Returns:
- A modified copy of the
thisobject
-
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 of the
thisobject
-
withRange
Copy the current immutable object by setting a value for therangeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for range- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanBufferViewCreateInfo of(Set<VulkanBufferViewCreateFlag> flags, VulkanBufferType buffer, VulkanFormat format, long offset, long range) Construct a new immutableVulkanBufferViewCreateInfoinstance.- Parameters:
flags- The value for theflagsattributebuffer- The value for thebufferattributeformat- The value for theformatattributeoffset- The value for theoffsetattributerange- The value for therangeattribute- Returns:
- An immutable VulkanBufferViewCreateInfo instance
-
of
public static VulkanBufferViewCreateInfo of(Iterable<VulkanBufferViewCreateFlag> flags, VulkanBufferType buffer, VulkanFormat format, long offset, long range) Construct a new immutableVulkanBufferViewCreateInfoinstance.- Parameters:
flags- The value for theflagsattributebuffer- The value for thebufferattributeformat- The value for theformatattributeoffset- The value for theoffsetattributerange- The value for therangeattribute- Returns:
- An immutable VulkanBufferViewCreateInfo instance
-
copyOf
Creates an immutable copy of aVulkanBufferViewCreateInfoTypevalue. 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 VulkanBufferViewCreateInfo instance
-
builder
Creates a builder forVulkanBufferViewCreateInfo.VulkanBufferViewCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanBufferViewCreateFlag) //flagselements .setBuffer(com.io7m.jcoronado.api.VulkanBufferType) // requiredbuffer.setFormat(com.io7m.jcoronado.api.VulkanFormat) // requiredformat.setOffset(long) // requiredoffset.setRange(long) // requiredrange.build();- Returns:
- A new VulkanBufferViewCreateInfo builder
-