Class VulkanSamplerCreateInfo
java.lang.Object
com.io7m.jcoronado.api.VulkanSamplerCreateInfo
- All Implemented Interfaces:
VulkanSamplerCreateInfoType
Structure specifying how to create a sampler.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanSamplerCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanSamplerCreateInfo.static VulkanSamplerCreateInfocopyOf(VulkanSamplerCreateInfoType instance) Creates an immutable copy of aVulkanSamplerCreateInfoTypevalue.booleanThis instance is equal to all instances ofVulkanSamplerCreateInfothat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:flags,magFilter,minFilter,mipmapMode,addressModeU,addressModeV,addressModeW,mipLodBias,maxAnisotropy,compareOp,minLod,maxLod,borderColor,unnormalizedCoordinates.If this value is non-empty, enable anisotropic filtering using the given amount of anisotropy.floatmaxLod()floatminLod()floatstatic VulkanSamplerCreateInfoof(Iterable<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, OptionalDouble maxAnisotropy, Optional<? extends VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates) Construct a new immutableVulkanSamplerCreateInfoinstance.static VulkanSamplerCreateInfoof(Set<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, OptionalDouble maxAnisotropy, Optional<VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates) Construct a new immutableVulkanSamplerCreateInfoinstance.toString()Prints the immutable valueVulkanSamplerCreateInfowith attribute values.booleanfinal VulkanSamplerCreateInfoCopy the current immutable object by setting a value for theaddressModeUattribute.final VulkanSamplerCreateInfoCopy the current immutable object by setting a value for theaddressModeVattribute.final VulkanSamplerCreateInfoCopy the current immutable object by setting a value for theaddressModeWattribute.final VulkanSamplerCreateInfowithBorderColor(VulkanBorderColor value) Copy the current immutable object by setting a value for theborderColorattribute.final VulkanSamplerCreateInfowithCompareOp(VulkanCompareOp value) Copy the current immutable object by setting a present value for the optionalcompareOpattribute.final VulkanSamplerCreateInfowithCompareOp(Optional<? extends VulkanCompareOp> optional) Copy the current immutable object by setting an optional value for thecompareOpattribute.final VulkanSamplerCreateInfowithFlags(VulkanSamplerCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.final VulkanSamplerCreateInfowithFlags(Iterable<VulkanSamplerCreateFlag> elements) Copy the current immutable object with elements that replace the content offlags.final VulkanSamplerCreateInfowithMagFilter(VulkanFilter value) Copy the current immutable object by setting a value for themagFilterattribute.final VulkanSamplerCreateInfowithMaxAnisotropy(double value) Copy the current immutable object by setting a present value for the optionalmaxAnisotropyattribute.final VulkanSamplerCreateInfowithMaxAnisotropy(OptionalDouble optional) Copy the current immutable object by setting an optional value for themaxAnisotropyattribute.final VulkanSamplerCreateInfowithMaxLod(float value) Copy the current immutable object by setting a value for themaxLodattribute.final VulkanSamplerCreateInfowithMinFilter(VulkanFilter value) Copy the current immutable object by setting a value for theminFilterattribute.final VulkanSamplerCreateInfowithMinLod(float value) Copy the current immutable object by setting a value for theminLodattribute.final VulkanSamplerCreateInfowithMipLodBias(float value) Copy the current immutable object by setting a value for themipLodBiasattribute.final VulkanSamplerCreateInfoCopy the current immutable object by setting a value for themipmapModeattribute.final VulkanSamplerCreateInfowithUnnormalizedCoordinates(boolean value) Copy the current immutable object by setting a value for theunnormalizedCoordinatesattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVulkanSamplerCreateInfoType- Returns:
- A set of flags describing additional parameters of the sampler.
-
magFilter
- Specified by:
magFilterin interfaceVulkanSamplerCreateInfoType- Returns:
- The magnification filter to apply to lookups.
-
minFilter
- Specified by:
minFilterin interfaceVulkanSamplerCreateInfoType- Returns:
- The minification filter to apply to lookups.
-
mipmapMode
- Specified by:
mipmapModein interfaceVulkanSamplerCreateInfoType- Returns:
- The mipmap filter to apply to lookups.
-
addressModeU
- Specified by:
addressModeUin interfaceVulkanSamplerCreateInfoType- Returns:
- The addressing mode for outside [0..1] range for U coordinates.
-
addressModeV
- Specified by:
addressModeVin interfaceVulkanSamplerCreateInfoType- Returns:
- The addressing mode for outside [0..1] range for V coordinates.
-
addressModeW
- Specified by:
addressModeWin interfaceVulkanSamplerCreateInfoType- Returns:
- The addressing mode for outside [0..1] range for W coordinates.
-
mipLodBias
public float mipLodBias()- Specified by:
mipLodBiasin interfaceVulkanSamplerCreateInfoType- Returns:
- The bias to be added to mipmap LOD (level-of-detail) calculation and bias provided by the image sampling functions in SPIR-V.
-
maxAnisotropy
If this value is non-empty, enable anisotropic filtering using the given amount of anisotropy.- Specified by:
maxAnisotropyin interfaceVulkanSamplerCreateInfoType- Returns:
- The anisotropy value clamp used by the sampler
-
compareOp
- Specified by:
compareOpin interfaceVulkanSamplerCreateInfoType- Returns:
- A value specifying the comparison function to apply to fetched data before filtering
-
minLod
public float minLod()- Specified by:
minLodin interfaceVulkanSamplerCreateInfoType- Returns:
- The minimum LOD clamp value
-
maxLod
public float maxLod()- Specified by:
maxLodin interfaceVulkanSamplerCreateInfoType- Returns:
- The maximum LOD clamp value
-
borderColor
- Specified by:
borderColorin interfaceVulkanSamplerCreateInfoType- Returns:
- The predefined border color to use.
-
unnormalizedCoordinates
public boolean unnormalizedCoordinates()- Specified by:
unnormalizedCoordinatesin interfaceVulkanSamplerCreateInfoType- Returns:
trueif the sampler coordinates should unnormalized
-
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
-
withMagFilter
Copy the current immutable object by setting a value for themagFilterattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for magFilter- Returns:
- A modified copy of the
thisobject
-
withMinFilter
Copy the current immutable object by setting a value for theminFilterattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minFilter- Returns:
- A modified copy of the
thisobject
-
withMipmapMode
Copy the current immutable object by setting a value for themipmapModeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mipmapMode- Returns:
- A modified copy of the
thisobject
-
withAddressModeU
Copy the current immutable object by setting a value for theaddressModeUattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for addressModeU- Returns:
- A modified copy of the
thisobject
-
withAddressModeV
Copy the current immutable object by setting a value for theaddressModeVattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for addressModeV- Returns:
- A modified copy of the
thisobject
-
withAddressModeW
Copy the current immutable object by setting a value for theaddressModeWattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for addressModeW- Returns:
- A modified copy of the
thisobject
-
withMipLodBias
Copy the current immutable object by setting a value for themipLodBiasattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mipLodBias- Returns:
- A modified copy of the
thisobject
-
withMaxAnisotropy
Copy the current immutable object by setting a present value for the optionalmaxAnisotropyattribute.- Parameters:
value- The value for maxAnisotropy- Returns:
- A modified copy of
thisobject
-
withMaxAnisotropy
Copy the current immutable object by setting an optional value for themaxAnisotropyattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for maxAnisotropy- Returns:
- A modified copy of
thisobject
-
withCompareOp
Copy the current immutable object by setting a present value for the optionalcompareOpattribute.- Parameters:
value- The value for compareOp- Returns:
- A modified copy of
thisobject
-
withCompareOp
Copy the current immutable object by setting an optional value for thecompareOpattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for compareOp- Returns:
- A modified copy of
thisobject
-
withMinLod
Copy the current immutable object by setting a value for theminLodattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minLod- Returns:
- A modified copy of the
thisobject
-
withMaxLod
Copy the current immutable object by setting a value for themaxLodattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxLod- Returns:
- A modified copy of the
thisobject
-
withBorderColor
Copy the current immutable object by setting a value for theborderColorattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for borderColor- Returns:
- A modified copy of the
thisobject
-
withUnnormalizedCoordinates
Copy the current immutable object by setting a value for theunnormalizedCoordinatesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for unnormalizedCoordinates- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanSamplerCreateInfo of(Set<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, OptionalDouble maxAnisotropy, Optional<VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates) Construct a new immutableVulkanSamplerCreateInfoinstance.- Parameters:
flags- The value for theflagsattributemagFilter- The value for themagFilterattributeminFilter- The value for theminFilterattributemipmapMode- The value for themipmapModeattributeaddressModeU- The value for theaddressModeUattributeaddressModeV- The value for theaddressModeVattributeaddressModeW- The value for theaddressModeWattributemipLodBias- The value for themipLodBiasattributemaxAnisotropy- The value for themaxAnisotropyattributecompareOp- The value for thecompareOpattributeminLod- The value for theminLodattributemaxLod- The value for themaxLodattributeborderColor- The value for theborderColorattributeunnormalizedCoordinates- The value for theunnormalizedCoordinatesattribute- Returns:
- An immutable VulkanSamplerCreateInfo instance
-
of
public static VulkanSamplerCreateInfo of(Iterable<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, OptionalDouble maxAnisotropy, Optional<? extends VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates) Construct a new immutableVulkanSamplerCreateInfoinstance.- Parameters:
flags- The value for theflagsattributemagFilter- The value for themagFilterattributeminFilter- The value for theminFilterattributemipmapMode- The value for themipmapModeattributeaddressModeU- The value for theaddressModeUattributeaddressModeV- The value for theaddressModeVattributeaddressModeW- The value for theaddressModeWattributemipLodBias- The value for themipLodBiasattributemaxAnisotropy- The value for themaxAnisotropyattributecompareOp- The value for thecompareOpattributeminLod- The value for theminLodattributemaxLod- The value for themaxLodattributeborderColor- The value for theborderColorattributeunnormalizedCoordinates- The value for theunnormalizedCoordinatesattribute- Returns:
- An immutable VulkanSamplerCreateInfo instance
-
copyOf
Creates an immutable copy of aVulkanSamplerCreateInfoTypevalue. 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 VulkanSamplerCreateInfo instance
-
builder
Creates a builder forVulkanSamplerCreateInfo.VulkanSamplerCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanSamplerCreateFlag) //flagselements .setMagFilter(com.io7m.jcoronado.api.VulkanFilter) // requiredmagFilter.setMinFilter(com.io7m.jcoronado.api.VulkanFilter) // requiredminFilter.setMipmapMode(com.io7m.jcoronado.api.VulkanSamplerMipmapMode) // requiredmipmapMode.setAddressModeU(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // requiredaddressModeU.setAddressModeV(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // requiredaddressModeV.setAddressModeW(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // requiredaddressModeW.setMipLodBias(float) // requiredmipLodBias.setMaxAnisotropy(double) // optionalmaxAnisotropy.setCompareOp(com.io7m.jcoronado.api.VulkanCompareOp) // optionalcompareOp.setMinLod(float) // requiredminLod.setMaxLod(float) // requiredmaxLod.setBorderColor(com.io7m.jcoronado.api.VulkanBorderColor) // requiredborderColor.setUnnormalizedCoordinates(boolean) // requiredunnormalizedCoordinates.build();- Returns:
- A new VulkanSamplerCreateInfo builder
-