- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanSamplerCreateInfo
-
- All Implemented Interfaces:
VulkanSamplerCreateInfoType
public final class VulkanSamplerCreateInfo extends java.lang.Object implements VulkanSamplerCreateInfoType
Structure specifying how to create a sampler.- See Also:
- "VkSamplerCreateInfo"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanSamplerCreateInfo.Builder
Builds instances of typeVulkanSamplerCreateInfo
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VulkanSamplerAddressMode
addressModeU()
VulkanSamplerAddressMode
addressModeV()
VulkanSamplerAddressMode
addressModeW()
VulkanBorderColor
borderColor()
static VulkanSamplerCreateInfo.Builder
builder()
Creates a builder forVulkanSamplerCreateInfo
.java.util.Optional<VulkanCompareOp>
compareOp()
static VulkanSamplerCreateInfo
copyOf(VulkanSamplerCreateInfoType instance)
Creates an immutable copy of aVulkanSamplerCreateInfoType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSamplerCreateInfo
that have equal attribute values.java.util.Set<VulkanSamplerCreateFlag>
flags()
int
hashCode()
Computes a hash code from attributes:flags
,magFilter
,minFilter
,mipmapMode
,addressModeU
,addressModeV
,addressModeW
,mipLodBias
,maxAnisotropy
,compareOp
,minLod
,maxLod
,borderColor
,unnormalizedCoordinates
.VulkanFilter
magFilter()
java.util.OptionalDouble
maxAnisotropy()
If this value is non-empty, enable anisotropic filtering using the given amount of anisotropy.float
maxLod()
VulkanFilter
minFilter()
float
minLod()
float
mipLodBias()
VulkanSamplerMipmapMode
mipmapMode()
static VulkanSamplerCreateInfo
of(java.lang.Iterable<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, java.util.OptionalDouble maxAnisotropy, java.util.Optional<? extends VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates)
Construct a new immutableVulkanSamplerCreateInfo
instance.static VulkanSamplerCreateInfo
of(java.util.Set<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, java.util.OptionalDouble maxAnisotropy, java.util.Optional<VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates)
Construct a new immutableVulkanSamplerCreateInfo
instance.java.lang.String
toString()
Prints the immutable valueVulkanSamplerCreateInfo
with attribute values.boolean
unnormalizedCoordinates()
VulkanSamplerCreateInfo
withAddressModeU(VulkanSamplerAddressMode value)
Copy the current immutable object by setting a value for theaddressModeU
attribute.VulkanSamplerCreateInfo
withAddressModeV(VulkanSamplerAddressMode value)
Copy the current immutable object by setting a value for theaddressModeV
attribute.VulkanSamplerCreateInfo
withAddressModeW(VulkanSamplerAddressMode value)
Copy the current immutable object by setting a value for theaddressModeW
attribute.VulkanSamplerCreateInfo
withBorderColor(VulkanBorderColor value)
Copy the current immutable object by setting a value for theborderColor
attribute.VulkanSamplerCreateInfo
withCompareOp(VulkanCompareOp value)
Copy the current immutable object by setting a present value for the optionalcompareOp
attribute.VulkanSamplerCreateInfo
withCompareOp(java.util.Optional<? extends VulkanCompareOp> optional)
Copy the current immutable object by setting an optional value for thecompareOp
attribute.VulkanSamplerCreateInfo
withFlags(VulkanSamplerCreateFlag... elements)
Copy the current immutable object with elements that replace the content offlags
.VulkanSamplerCreateInfo
withFlags(java.lang.Iterable<VulkanSamplerCreateFlag> elements)
Copy the current immutable object with elements that replace the content offlags
.VulkanSamplerCreateInfo
withMagFilter(VulkanFilter value)
Copy the current immutable object by setting a value for themagFilter
attribute.VulkanSamplerCreateInfo
withMaxAnisotropy(double value)
Copy the current immutable object by setting a present value for the optionalmaxAnisotropy
attribute.VulkanSamplerCreateInfo
withMaxAnisotropy(java.util.OptionalDouble optional)
Copy the current immutable object by setting an optional value for themaxAnisotropy
attribute.VulkanSamplerCreateInfo
withMaxLod(float value)
Copy the current immutable object by setting a value for themaxLod
attribute.VulkanSamplerCreateInfo
withMinFilter(VulkanFilter value)
Copy the current immutable object by setting a value for theminFilter
attribute.VulkanSamplerCreateInfo
withMinLod(float value)
Copy the current immutable object by setting a value for theminLod
attribute.VulkanSamplerCreateInfo
withMipLodBias(float value)
Copy the current immutable object by setting a value for themipLodBias
attribute.VulkanSamplerCreateInfo
withMipmapMode(VulkanSamplerMipmapMode value)
Copy the current immutable object by setting a value for themipmapMode
attribute.VulkanSamplerCreateInfo
withUnnormalizedCoordinates(boolean value)
Copy the current immutable object by setting a value for theunnormalizedCoordinates
attribute.
-
-
-
Method Detail
-
flags
public java.util.Set<VulkanSamplerCreateFlag> flags()
- Specified by:
flags
in interfaceVulkanSamplerCreateInfoType
- Returns:
- A set of flags describing additional parameters of the sampler.
-
magFilter
public VulkanFilter magFilter()
- Specified by:
magFilter
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The magnification filter to apply to lookups.
-
minFilter
public VulkanFilter minFilter()
- Specified by:
minFilter
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The minification filter to apply to lookups.
-
mipmapMode
public VulkanSamplerMipmapMode mipmapMode()
- Specified by:
mipmapMode
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The mipmap filter to apply to lookups.
-
addressModeU
public VulkanSamplerAddressMode addressModeU()
- Specified by:
addressModeU
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The addressing mode for outside [0..1] range for U coordinates.
-
addressModeV
public VulkanSamplerAddressMode addressModeV()
- Specified by:
addressModeV
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The addressing mode for outside [0..1] range for V coordinates.
-
addressModeW
public VulkanSamplerAddressMode addressModeW()
- Specified by:
addressModeW
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The addressing mode for outside [0..1] range for W coordinates.
-
mipLodBias
public float mipLodBias()
- Specified by:
mipLodBias
in 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
public java.util.OptionalDouble maxAnisotropy()
If this value is non-empty, enable anisotropic filtering using the given amount of anisotropy.- Specified by:
maxAnisotropy
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The anisotropy value clamp used by the sampler
-
compareOp
public java.util.Optional<VulkanCompareOp> compareOp()
- Specified by:
compareOp
in interfaceVulkanSamplerCreateInfoType
- Returns:
- A value specifying the comparison function to apply to fetched data before filtering
-
minLod
public float minLod()
- Specified by:
minLod
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The minimum LOD clamp value
-
maxLod
public float maxLod()
- Specified by:
maxLod
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The maximum LOD clamp value
-
borderColor
public VulkanBorderColor borderColor()
- Specified by:
borderColor
in interfaceVulkanSamplerCreateInfoType
- Returns:
- The predefined border color to use.
-
unnormalizedCoordinates
public boolean unnormalizedCoordinates()
- Specified by:
unnormalizedCoordinates
in interfaceVulkanSamplerCreateInfoType
- Returns:
true
if the sampler coordinates should unnormalized
-
withFlags
public final VulkanSamplerCreateInfo withFlags(VulkanSamplerCreateFlag... elements)
Copy the current immutable object with elements that replace the content offlags
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withFlags
public final VulkanSamplerCreateInfo withFlags(java.lang.Iterable<VulkanSamplerCreateFlag> elements)
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
this
object
-
withMagFilter
public final VulkanSamplerCreateInfo withMagFilter(VulkanFilter value)
Copy the current immutable object by setting a value for themagFilter
attribute. 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
this
object
-
withMinFilter
public final VulkanSamplerCreateInfo withMinFilter(VulkanFilter value)
Copy the current immutable object by setting a value for theminFilter
attribute. 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
this
object
-
withMipmapMode
public final VulkanSamplerCreateInfo withMipmapMode(VulkanSamplerMipmapMode value)
Copy the current immutable object by setting a value for themipmapMode
attribute. 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
this
object
-
withAddressModeU
public final VulkanSamplerCreateInfo withAddressModeU(VulkanSamplerAddressMode value)
Copy the current immutable object by setting a value for theaddressModeU
attribute. 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
this
object
-
withAddressModeV
public final VulkanSamplerCreateInfo withAddressModeV(VulkanSamplerAddressMode value)
Copy the current immutable object by setting a value for theaddressModeV
attribute. 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
this
object
-
withAddressModeW
public final VulkanSamplerCreateInfo withAddressModeW(VulkanSamplerAddressMode value)
Copy the current immutable object by setting a value for theaddressModeW
attribute. 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
this
object
-
withMipLodBias
public final VulkanSamplerCreateInfo withMipLodBias(float value)
Copy the current immutable object by setting a value for themipLodBias
attribute. 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
this
object
-
withMaxAnisotropy
public final VulkanSamplerCreateInfo withMaxAnisotropy(double value)
Copy the current immutable object by setting a present value for the optionalmaxAnisotropy
attribute.- Parameters:
value
- The value for maxAnisotropy- Returns:
- A modified copy of
this
object
-
withMaxAnisotropy
public final VulkanSamplerCreateInfo withMaxAnisotropy(java.util.OptionalDouble optional)
Copy the current immutable object by setting an optional value for themaxAnisotropy
attribute. 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
this
object
-
withCompareOp
public final VulkanSamplerCreateInfo withCompareOp(VulkanCompareOp value)
Copy the current immutable object by setting a present value for the optionalcompareOp
attribute.- Parameters:
value
- The value for compareOp- Returns:
- A modified copy of
this
object
-
withCompareOp
public final VulkanSamplerCreateInfo withCompareOp(java.util.Optional<? extends VulkanCompareOp> optional)
Copy the current immutable object by setting an optional value for thecompareOp
attribute. 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
this
object
-
withMinLod
public final VulkanSamplerCreateInfo withMinLod(float value)
Copy the current immutable object by setting a value for theminLod
attribute. 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
this
object
-
withMaxLod
public final VulkanSamplerCreateInfo withMaxLod(float value)
Copy the current immutable object by setting a value for themaxLod
attribute. 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
this
object
-
withBorderColor
public final VulkanSamplerCreateInfo withBorderColor(VulkanBorderColor value)
Copy the current immutable object by setting a value for theborderColor
attribute. 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
this
object
-
withUnnormalizedCoordinates
public final VulkanSamplerCreateInfo withUnnormalizedCoordinates(boolean value)
Copy the current immutable object by setting a value for theunnormalizedCoordinates
attribute. 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
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanSamplerCreateInfo
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:flags
,magFilter
,minFilter
,mipmapMode
,addressModeU
,addressModeV
,addressModeW
,mipLodBias
,maxAnisotropy
,compareOp
,minLod
,maxLod
,borderColor
,unnormalizedCoordinates
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanSamplerCreateInfo
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanSamplerCreateInfo of(java.util.Set<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, java.util.OptionalDouble maxAnisotropy, java.util.Optional<VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates)
Construct a new immutableVulkanSamplerCreateInfo
instance.- Parameters:
flags
- The value for theflags
attributemagFilter
- The value for themagFilter
attributeminFilter
- The value for theminFilter
attributemipmapMode
- The value for themipmapMode
attributeaddressModeU
- The value for theaddressModeU
attributeaddressModeV
- The value for theaddressModeV
attributeaddressModeW
- The value for theaddressModeW
attributemipLodBias
- The value for themipLodBias
attributemaxAnisotropy
- The value for themaxAnisotropy
attributecompareOp
- The value for thecompareOp
attributeminLod
- The value for theminLod
attributemaxLod
- The value for themaxLod
attributeborderColor
- The value for theborderColor
attributeunnormalizedCoordinates
- The value for theunnormalizedCoordinates
attribute- Returns:
- An immutable VulkanSamplerCreateInfo instance
-
of
public static VulkanSamplerCreateInfo of(java.lang.Iterable<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, java.util.OptionalDouble maxAnisotropy, java.util.Optional<? extends VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates)
Construct a new immutableVulkanSamplerCreateInfo
instance.- Parameters:
flags
- The value for theflags
attributemagFilter
- The value for themagFilter
attributeminFilter
- The value for theminFilter
attributemipmapMode
- The value for themipmapMode
attributeaddressModeU
- The value for theaddressModeU
attributeaddressModeV
- The value for theaddressModeV
attributeaddressModeW
- The value for theaddressModeW
attributemipLodBias
- The value for themipLodBias
attributemaxAnisotropy
- The value for themaxAnisotropy
attributecompareOp
- The value for thecompareOp
attributeminLod
- The value for theminLod
attributemaxLod
- The value for themaxLod
attributeborderColor
- The value for theborderColor
attributeunnormalizedCoordinates
- The value for theunnormalizedCoordinates
attribute- Returns:
- An immutable VulkanSamplerCreateInfo instance
-
copyOf
public static VulkanSamplerCreateInfo copyOf(VulkanSamplerCreateInfoType instance)
Creates an immutable copy of aVulkanSamplerCreateInfoType
value. 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
public static VulkanSamplerCreateInfo.Builder builder()
Creates a builder forVulkanSamplerCreateInfo
.- Returns:
- A new VulkanSamplerCreateInfo builder
-
-