Class VMAAllocationCreateInfo.Builder
java.lang.Object
com.io7m.jcoronado.vma.VMAAllocationCreateInfo.Builder
- Enclosing class:
VMAAllocationCreateInfo
Builds instances of type
VMAAllocationCreateInfo.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllFlags(Iterable<VMAAllocationCreateFlag> elements) Adds elements toflagsset.addAllPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Adds elements topreferredFlagsset.addAllRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Adds elements torequiredFlagsset.addFlags(VMAAllocationCreateFlag element) Adds one element toflagsset.addFlags(VMAAllocationCreateFlag... elements) Adds elements toflagsset.Adds one element topreferredFlagsset.addPreferredFlags(VulkanMemoryPropertyFlag... elements) Adds elements topreferredFlagsset.addRequiredFlags(VulkanMemoryPropertyFlag element) Adds one element torequiredFlagsset.addRequiredFlags(VulkanMemoryPropertyFlag... elements) Adds elements torequiredFlagsset.build()Builds a newVMAAllocationCreateInfo.from(VMAAllocationCreateInfoType instance) Fill a builder with attribute values from the providedVMAAllocationCreateInfoTypeinstance.setFlags(Iterable<VMAAllocationCreateFlag> elements) Sets or replaces all elements forflagsset.setMemoryTypeBits(long memoryTypeBits) Initializes the value for thememoryTypeBitsattribute.setPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Sets or replaces all elements forpreferredFlagsset.setRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Sets or replaces all elements forrequiredFlagsset.setUsage(VMAMemoryUsage usage) Initializes the value for theusageattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVMAAllocationCreateInfoTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addFlags
Adds one element toflagsset.- Parameters:
element- A flags element- Returns:
thisbuilder for use in a chained invocation
-
addFlags
Adds elements toflagsset.- Parameters:
elements- An array of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setFlags
Sets or replaces all elements forflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFlags
public final VMAAllocationCreateInfo.Builder addAllFlags(Iterable<VMAAllocationCreateFlag> elements) Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setUsage
-
addRequiredFlags
Adds one element torequiredFlagsset.- Parameters:
element- A requiredFlags element- Returns:
thisbuilder for use in a chained invocation
-
addRequiredFlags
Adds elements torequiredFlagsset.- Parameters:
elements- An array of requiredFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setRequiredFlags
public final VMAAllocationCreateInfo.Builder setRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Sets or replaces all elements forrequiredFlagsset.- Parameters:
elements- An iterable of requiredFlags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRequiredFlags
public final VMAAllocationCreateInfo.Builder addAllRequiredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Adds elements torequiredFlagsset.- Parameters:
elements- An iterable of requiredFlags elements- Returns:
thisbuilder for use in a chained invocation
-
addPreferredFlags
Adds one element topreferredFlagsset.- Parameters:
element- A preferredFlags element- Returns:
thisbuilder for use in a chained invocation
-
addPreferredFlags
public final VMAAllocationCreateInfo.Builder addPreferredFlags(VulkanMemoryPropertyFlag... elements) Adds elements topreferredFlagsset.- Parameters:
elements- An array of preferredFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setPreferredFlags
public final VMAAllocationCreateInfo.Builder setPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Sets or replaces all elements forpreferredFlagsset.- Parameters:
elements- An iterable of preferredFlags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPreferredFlags
public final VMAAllocationCreateInfo.Builder addAllPreferredFlags(Iterable<VulkanMemoryPropertyFlag> elements) Adds elements topreferredFlagsset.- Parameters:
elements- An iterable of preferredFlags elements- Returns:
thisbuilder for use in a chained invocation
-
setMemoryTypeBits
Initializes the value for thememoryTypeBitsattribute.If not set, this attribute will have a default value as returned by the initializer of
memoryTypeBits.- Parameters:
memoryTypeBits- The value for memoryTypeBits- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVMAAllocationCreateInfo.- Returns:
- An immutable instance of VMAAllocationCreateInfo
- Throws:
IllegalStateException- if any required attributes are missing
-