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
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeVulkanBufferViewCreateInfo
. -
Method Summary
Modifier and TypeMethodDescriptionbuffer()
builder()
Creates a builder forVulkanBufferViewCreateInfo
.static VulkanBufferViewCreateInfo
copyOf
(VulkanBufferViewCreateInfoType instance) Creates an immutable copy of aVulkanBufferViewCreateInfoType
value.boolean
This instance is equal to all instances ofVulkanBufferViewCreateInfo
that have equal attribute values.flags()
format()
int
hashCode()
Computes a hash code from attributes:flags
,buffer
,format
,offset
,range
.static VulkanBufferViewCreateInfo
of
(Iterable<VulkanBufferViewCreateFlag> flags, VulkanBufferType buffer, VulkanFormat format, long offset, long range) Construct a new immutableVulkanBufferViewCreateInfo
instance.static VulkanBufferViewCreateInfo
of
(Set<VulkanBufferViewCreateFlag> flags, VulkanBufferType buffer, VulkanFormat format, long offset, long range) Construct a new immutableVulkanBufferViewCreateInfo
instance.long
offset()
long
range()
toString()
Prints the immutable valueVulkanBufferViewCreateInfo
with attribute values.withBuffer
(VulkanBufferType value) Copy the current immutable object by setting a value for thebuffer
attribute.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 theformat
attribute.withOffset
(long value) Copy the current immutable object by setting a value for theoffset
attribute.withRange
(long value) Copy the current immutable object by setting a value for therange
attribute.
-
Method Details
-
flags
- Specified by:
flags
in interfaceVulkanBufferViewCreateInfoType
- Returns:
- A set of flags specifying additional parameters of the buffer view.
-
buffer
- Specified by:
buffer
in interfaceVulkanBufferViewCreateInfoType
- Returns:
- The buffer on which the view will be created
-
format
- Specified by:
format
in interfaceVulkanBufferViewCreateInfoType
- Returns:
- The format of the data elements in the buffer
-
offset
public long offset()- Specified by:
offset
in 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:
range
in 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
this
object
-
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
this
object
-
withBuffer
Copy the current immutable object by setting a value for thebuffer
attribute. 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
this
object
-
withFormat
Copy the current immutable object by setting a value for theformat
attribute. 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
this
object
-
withOffset
Copy the current immutable object by setting a value for theoffset
attribute. 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
this
object
-
withRange
Copy the current immutable object by setting a value for therange
attribute. 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
this
object
-
equals
-
hashCode
-
toString
-
of
public static VulkanBufferViewCreateInfo of(Set<VulkanBufferViewCreateFlag> flags, VulkanBufferType buffer, VulkanFormat format, long offset, long range) Construct a new immutableVulkanBufferViewCreateInfo
instance.- Parameters:
flags
- The value for theflags
attributebuffer
- The value for thebuffer
attributeformat
- The value for theformat
attributeoffset
- The value for theoffset
attributerange
- The value for therange
attribute- Returns:
- An immutable VulkanBufferViewCreateInfo instance
-
of
public static VulkanBufferViewCreateInfo of(Iterable<VulkanBufferViewCreateFlag> flags, VulkanBufferType buffer, VulkanFormat format, long offset, long range) Construct a new immutableVulkanBufferViewCreateInfo
instance.- Parameters:
flags
- The value for theflags
attributebuffer
- The value for thebuffer
attributeformat
- The value for theformat
attributeoffset
- The value for theoffset
attributerange
- The value for therange
attribute- Returns:
- An immutable VulkanBufferViewCreateInfo instance
-
copyOf
Creates an immutable copy of aVulkanBufferViewCreateInfoType
value. 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) //
flags
elements .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
-