Class VulkanBufferCreateInfo
java.lang.Object
com.io7m.jcoronado.api.VulkanBufferCreateInfo
- All Implemented Interfaces:
VulkanBufferCreateInfoType
Information required to create a buffer.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanBufferCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanBufferCreateInfo.static VulkanBufferCreateInfocopyOf(VulkanBufferCreateInfoType instance) Creates an immutable copy of aVulkanBufferCreateInfoTypevalue.booleanThis instance is equal to all instances ofVulkanBufferCreateInfothat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:flags,size,usageFlags,sharingMode,queueFamilyIndices.static VulkanBufferCreateInfoof(Iterable<VulkanBufferCreateFlag> flags, long size, Iterable<VulkanBufferUsageFlag> usageFlags, VulkanSharingMode sharingMode, Iterable<? extends VulkanQueueFamilyIndex> queueFamilyIndices) Construct a new immutableVulkanBufferCreateInfoinstance.static VulkanBufferCreateInfoof(Set<VulkanBufferCreateFlag> flags, long size, Set<VulkanBufferUsageFlag> usageFlags, VulkanSharingMode sharingMode, List<VulkanQueueFamilyIndex> queueFamilyIndices) Construct a new immutableVulkanBufferCreateInfoinstance.longsize()toString()Prints the immutable valueVulkanBufferCreateInfowith attribute values.final VulkanBufferCreateInfowithFlags(VulkanBufferCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.final VulkanBufferCreateInfowithFlags(Iterable<VulkanBufferCreateFlag> elements) Copy the current immutable object with elements that replace the content offlags.final VulkanBufferCreateInfowithQueueFamilyIndices(VulkanQueueFamilyIndex... elements) Copy the current immutable object with elements that replace the content ofqueueFamilyIndices.final VulkanBufferCreateInfowithQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Copy the current immutable object with elements that replace the content ofqueueFamilyIndices.final VulkanBufferCreateInfowithSharingMode(VulkanSharingMode value) Copy the current immutable object by setting a value for thesharingModeattribute.final VulkanBufferCreateInfowithSize(long value) Copy the current immutable object by setting a value for thesizeattribute.final VulkanBufferCreateInfowithUsageFlags(VulkanBufferUsageFlag... elements) Copy the current immutable object with elements that replace the content ofusageFlags.final VulkanBufferCreateInfowithUsageFlags(Iterable<VulkanBufferUsageFlag> elements) Copy the current immutable object with elements that replace the content ofusageFlags.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVulkanBufferCreateInfoType- Returns:
- A bitmask of VkBufferCreateFlagBits specifying additional parameters of the buffer.
-
size
public long size()- Specified by:
sizein interfaceVulkanBufferCreateInfoType- Returns:
- The size in bytes of the buffer to be created.
-
usageFlags
- Specified by:
usageFlagsin interfaceVulkanBufferCreateInfoType- Returns:
- A bitmask of VkBufferUsageFlagBits specifying allowed usages of the buffer.
-
sharingMode
- Specified by:
sharingModein interfaceVulkanBufferCreateInfoType- Returns:
- A VkSharingMode value specifying the sharing mode of the buffer when it will be accessed by multiple queue families.
-
queueFamilyIndices
- Specified by:
queueFamilyIndicesin interfaceVulkanBufferCreateInfoType- Returns:
- A list of queue families that will access this buffer (ignored if sharingMode is not VK_SHARING_MODE_CONCURRENT).
-
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
-
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 of the
thisobject
-
withUsageFlags
Copy the current immutable object with elements that replace the content ofusageFlags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withUsageFlags
Copy the current immutable object with elements that replace the content ofusageFlags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of usageFlags elements to set- Returns:
- A modified copy of
thisobject
-
withSharingMode
Copy the current immutable object by setting a value for thesharingModeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sharingMode- Returns:
- A modified copy of the
thisobject
-
withQueueFamilyIndices
Copy the current immutable object with elements that replace the content ofqueueFamilyIndices.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withQueueFamilyIndices
public final VulkanBufferCreateInfo withQueueFamilyIndices(Iterable<? extends VulkanQueueFamilyIndex> elements) Copy the current immutable object with elements that replace the content ofqueueFamilyIndices. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of queueFamilyIndices elements to set- Returns:
- A modified copy of
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanBufferCreateInfo of(Set<VulkanBufferCreateFlag> flags, long size, Set<VulkanBufferUsageFlag> usageFlags, VulkanSharingMode sharingMode, List<VulkanQueueFamilyIndex> queueFamilyIndices) Construct a new immutableVulkanBufferCreateInfoinstance.- Parameters:
flags- The value for theflagsattributesize- The value for thesizeattributeusageFlags- The value for theusageFlagsattributesharingMode- The value for thesharingModeattributequeueFamilyIndices- The value for thequeueFamilyIndicesattribute- Returns:
- An immutable VulkanBufferCreateInfo instance
-
of
public static VulkanBufferCreateInfo of(Iterable<VulkanBufferCreateFlag> flags, long size, Iterable<VulkanBufferUsageFlag> usageFlags, VulkanSharingMode sharingMode, Iterable<? extends VulkanQueueFamilyIndex> queueFamilyIndices) Construct a new immutableVulkanBufferCreateInfoinstance.- Parameters:
flags- The value for theflagsattributesize- The value for thesizeattributeusageFlags- The value for theusageFlagsattributesharingMode- The value for thesharingModeattributequeueFamilyIndices- The value for thequeueFamilyIndicesattribute- Returns:
- An immutable VulkanBufferCreateInfo instance
-
copyOf
Creates an immutable copy of aVulkanBufferCreateInfoTypevalue. 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 VulkanBufferCreateInfo instance
-
builder
Creates a builder forVulkanBufferCreateInfo.VulkanBufferCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanBufferCreateFlag) //flagselements .setSize(long) // requiredsize.addUsageFlags|addAllUsageFlags(com.io7m.jcoronado.api.VulkanBufferUsageFlag) //usageFlagselements .setSharingMode(com.io7m.jcoronado.api.VulkanSharingMode) // requiredsharingMode.addQueueFamilyIndices|addAllQueueFamilyIndices(com.io7m.jcoronado.api.VulkanQueueFamilyIndex) //queueFamilyIndiceselements .build();- Returns:
- A new VulkanBufferCreateInfo builder
-