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()floattoString()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 or
thisif not changed
-
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 or 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 or 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 or 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 or 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 or 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 or 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 or 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 or
thisif not changed
-
withMaxAnisotropy
Copy the current immutable object by setting an optional value for themaxAnisotropyattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for maxAnisotropy- Returns:
- A modified copy or
thisif not changed
-
withCompareOp
Copy the current immutable object by setting a present value for the optionalcompareOpattribute.- Parameters:
value- The value for compareOp- Returns:
- A modified copy or
thisif not changed
-
withCompareOp
Copy the current immutable object by setting an optional value for thecompareOpattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for compareOp- Returns:
- A modified copy or
thisif not changed
-
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 or 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 or 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 or 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 or the
thisobject
-
equals
-
hashCode
-
toString
-
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) // optionalmagFilter.setMinFilter(com.io7m.jcoronado.api.VulkanFilter) // optionalminFilter.setMipmapMode(com.io7m.jcoronado.api.VulkanSamplerMipmapMode) // optionalmipmapMode.setAddressModeU(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // optionaladdressModeU.setAddressModeV(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // optionaladdressModeV.setAddressModeW(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // optionaladdressModeW.setMipLodBias(float) // optionalmipLodBias.setMaxAnisotropy(OptionalDouble) // optionalmaxAnisotropy.setCompareOp(Optional<com.io7m.jcoronado.api.VulkanCompareOp>) // optionalcompareOp.setMinLod(float) // optionalminLod.setMaxLod(float) // optionalmaxLod.setBorderColor(com.io7m.jcoronado.api.VulkanBorderColor) // optionalborderColor.setUnnormalizedCoordinates(boolean) // optionalunnormalizedCoordinates.build();- Returns:
- A new VulkanSamplerCreateInfo builder
-