Class VulkanSamplerCreateInfo.Builder
java.lang.Object
com.io7m.jcoronado.api.VulkanSamplerCreateInfo.Builder
- Enclosing class:
VulkanSamplerCreateInfo
Builds instances of type
VulkanSamplerCreateInfo.
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<VulkanSamplerCreateFlag> elements) Adds elements toflagsset.addFlags(VulkanSamplerCreateFlag element) Adds one element toflagsset.addFlags(VulkanSamplerCreateFlag... elements) Adds elements toflagsset.build()Builds a newVulkanSamplerCreateInfo.from(VulkanSamplerCreateInfoType instance) Fill a builder with attribute values from the providedVulkanSamplerCreateInfoTypeinstance.setAddressModeU(VulkanSamplerAddressMode addressModeU) Initializes the value for theaddressModeUattribute.setAddressModeV(VulkanSamplerAddressMode addressModeV) Initializes the value for theaddressModeVattribute.setAddressModeW(VulkanSamplerAddressMode addressModeW) Initializes the value for theaddressModeWattribute.setBorderColor(VulkanBorderColor borderColor) Initializes the value for theborderColorattribute.setCompareOp(VulkanCompareOp compareOp) Initializes the optional valuecompareOpto compareOp.setCompareOp(Optional<? extends VulkanCompareOp> compareOp) Initializes the optional valuecompareOpto compareOp.setFlags(Iterable<VulkanSamplerCreateFlag> elements) Sets or replaces all elements forflagsset.setMagFilter(VulkanFilter magFilter) Initializes the value for themagFilterattribute.setMaxAnisotropy(double maxAnisotropy) Initializes the optional valuemaxAnisotropyto maxAnisotropy.setMaxAnisotropy(OptionalDouble maxAnisotropy) Initializes the optional valuemaxAnisotropyto maxAnisotropy.setMaxLod(float maxLod) Initializes the value for themaxLodattribute.setMinFilter(VulkanFilter minFilter) Initializes the value for theminFilterattribute.setMinLod(float minLod) Initializes the value for theminLodattribute.setMipLodBias(float mipLodBias) Initializes the value for themipLodBiasattribute.setMipmapMode(VulkanSamplerMipmapMode mipmapMode) Initializes the value for themipmapModeattribute.setUnnormalizedCoordinates(boolean unnormalizedCoordinates) Initializes the value for theunnormalizedCoordinatesattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedVulkanSamplerCreateInfoTypeinstance. 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 VulkanSamplerCreateInfo.Builder addAllFlags(Iterable<VulkanSamplerCreateFlag> elements) Adds elements toflagsset.- Parameters:
elements- An iterable of flags elements- Returns:
thisbuilder for use in a chained invocation
-
setMagFilter
Initializes the value for themagFilterattribute.- Parameters:
magFilter- The value for magFilter- Returns:
thisbuilder for use in a chained invocation
-
setMinFilter
Initializes the value for theminFilterattribute.- Parameters:
minFilter- The value for minFilter- Returns:
thisbuilder for use in a chained invocation
-
setMipmapMode
Initializes the value for themipmapModeattribute.- Parameters:
mipmapMode- The value for mipmapMode- Returns:
thisbuilder for use in a chained invocation
-
setAddressModeU
Initializes the value for theaddressModeUattribute.- Parameters:
addressModeU- The value for addressModeU- Returns:
thisbuilder for use in a chained invocation
-
setAddressModeV
Initializes the value for theaddressModeVattribute.- Parameters:
addressModeV- The value for addressModeV- Returns:
thisbuilder for use in a chained invocation
-
setAddressModeW
Initializes the value for theaddressModeWattribute.- Parameters:
addressModeW- The value for addressModeW- Returns:
thisbuilder for use in a chained invocation
-
setMipLodBias
Initializes the value for themipLodBiasattribute.- Parameters:
mipLodBias- The value for mipLodBias- Returns:
thisbuilder for use in a chained invocation
-
setMaxAnisotropy
Initializes the optional valuemaxAnisotropyto maxAnisotropy.- Parameters:
maxAnisotropy- The value for maxAnisotropy- Returns:
thisbuilder for chained invocation
-
setMaxAnisotropy
Initializes the optional valuemaxAnisotropyto maxAnisotropy.- Parameters:
maxAnisotropy- The value for maxAnisotropy- Returns:
thisbuilder for use in a chained invocation
-
setCompareOp
Initializes the optional valuecompareOpto compareOp.- Parameters:
compareOp- The value for compareOp- Returns:
thisbuilder for chained invocation
-
setCompareOp
public final VulkanSamplerCreateInfo.Builder setCompareOp(Optional<? extends VulkanCompareOp> compareOp) Initializes the optional valuecompareOpto compareOp.- Parameters:
compareOp- The value for compareOp- Returns:
thisbuilder for use in a chained invocation
-
setMinLod
Initializes the value for theminLodattribute.- Parameters:
minLod- The value for minLod- Returns:
thisbuilder for use in a chained invocation
-
setMaxLod
Initializes the value for themaxLodattribute.- Parameters:
maxLod- The value for maxLod- Returns:
thisbuilder for use in a chained invocation
-
setBorderColor
Initializes the value for theborderColorattribute.- Parameters:
borderColor- The value for borderColor- Returns:
thisbuilder for use in a chained invocation
-
setUnnormalizedCoordinates
public final VulkanSamplerCreateInfo.Builder setUnnormalizedCoordinates(boolean unnormalizedCoordinates) Initializes the value for theunnormalizedCoordinatesattribute.- Parameters:
unnormalizedCoordinates- The value for unnormalizedCoordinates- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newVulkanSamplerCreateInfo.- Returns:
- An immutable instance of VulkanSamplerCreateInfo
- Throws:
IllegalStateException- if any required attributes are missing
-