Class VulkanVertexInputAttributeDescription
java.lang.Object
com.io7m.jcoronado.api.VulkanVertexInputAttributeDescription
- All Implemented Interfaces:
VulkanVertexInputAttributeDescriptionType
public final class VulkanVertexInputAttributeDescription
extends Object
implements VulkanVertexInputAttributeDescriptionType
Structure specifying vertex input attribute description.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanVertexInputAttributeDescription. -
Method Summary
Modifier and TypeMethodDescriptionintbinding()builder()Creates a builder forVulkanVertexInputAttributeDescription.Creates an immutable copy of aVulkanVertexInputAttributeDescriptionTypevalue.booleanThis instance is equal to all instances ofVulkanVertexInputAttributeDescriptionthat have equal attribute values.format()inthashCode()Computes a hash code from attributes:location,binding,format,offset.intlocation()intoffset()toString()Prints the immutable valueVulkanVertexInputAttributeDescriptionwith attribute values.withBinding(int value) Copy the current immutable object by setting a value for thebindingattribute.withFormat(VulkanFormat value) Copy the current immutable object by setting a value for theformatattribute.withLocation(int value) Copy the current immutable object by setting a value for thelocationattribute.withOffset(int value) Copy the current immutable object by setting a value for theoffsetattribute.
-
Method Details
-
location
public int location()- Specified by:
locationin interfaceVulkanVertexInputAttributeDescriptionType- Returns:
- The shader binding location number for this attribute.
-
binding
public int binding()- Specified by:
bindingin interfaceVulkanVertexInputAttributeDescriptionType- Returns:
- The binding number which this attribute takes its data from.
-
format
- Specified by:
formatin interfaceVulkanVertexInputAttributeDescriptionType- Returns:
- The the size and type of the vertex attribute data.
-
offset
public int offset()- Specified by:
offsetin interfaceVulkanVertexInputAttributeDescriptionType- Returns:
- a byte offset of this attribute relative to the start of an element in the vertex input binding.
-
withLocation
Copy the current immutable object by setting a value for thelocationattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for location- Returns:
- A modified copy or the
thisobject
-
withBinding
Copy the current immutable object by setting a value for thebindingattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for binding- Returns:
- A modified copy or 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 or 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 or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
public static VulkanVertexInputAttributeDescription copyOf(VulkanVertexInputAttributeDescriptionType instance) Creates an immutable copy of aVulkanVertexInputAttributeDescriptionTypevalue. 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 VulkanVertexInputAttributeDescription instance
-
builder
Creates a builder forVulkanVertexInputAttributeDescription.VulkanVertexInputAttributeDescription.builder() .setLocation(int) // optional
location.setBinding(int) // optionalbinding.setFormat(com.io7m.jcoronado.api.VulkanFormat) // optionalformat.setOffset(int) // optionaloffset.build();- Returns:
- A new VulkanVertexInputAttributeDescription builder
-