Class VulkanSamplerCreateInfo.Builder
- Enclosing class:
VulkanSamplerCreateInfo
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
-
setMinFilter
-
setMipmapMode
Initializes the value for themipmapModeattribute.If not set, this attribute will have a default value as returned by the initializer of
mipmapMode.- Parameters:
mipmapMode- The value for mipmapMode- Returns:
thisbuilder for use in a chained invocation
-
setAddressModeU
Initializes the value for theaddressModeUattribute.If not set, this attribute will have a default value as returned by the initializer of
addressModeU.- Parameters:
addressModeU- The value for addressModeU- Returns:
thisbuilder for use in a chained invocation
-
setAddressModeV
Initializes the value for theaddressModeVattribute.If not set, this attribute will have a default value as returned by the initializer of
addressModeV.- Parameters:
addressModeV- The value for addressModeV- Returns:
thisbuilder for use in a chained invocation
-
setAddressModeW
Initializes the value for theaddressModeWattribute.If not set, this attribute will have a default value as returned by the initializer of
addressModeW.- Parameters:
addressModeW- The value for addressModeW- Returns:
thisbuilder for use in a chained invocation
-
setMipLodBias
Initializes the value for themipLodBiasattribute.If not set, this attribute will have a default value as returned by the initializer of
mipLodBias.- 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
-
setMaxLod
-
setBorderColor
Initializes the value for theborderColorattribute.If not set, this attribute will have a default value as returned by the initializer of
borderColor.- 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.If not set, this attribute will have a default value as returned by the initializer of
unnormalizedCoordinates.- 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
-