- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanStencilOpState
-
- All Implemented Interfaces:
VulkanStencilOpStateType
public final class VulkanStencilOpState extends java.lang.Object implements VulkanStencilOpStateType
- See Also:
- "VkStencilOpState"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanStencilOpState.Builder
Builds instances of typeVulkanStencilOpState
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanStencilOpState.Builder
builder()
Creates a builder forVulkanStencilOpState
.int
compareMask()
VulkanCompareOp
compareOp()
static VulkanStencilOpState
copyOf(VulkanStencilOpStateType instance)
Creates an immutable copy of aVulkanStencilOpStateType
value.VulkanStencilOp
depthFailOp()
boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanStencilOpState
that have equal attribute values.VulkanStencilOp
failOp()
int
hashCode()
Computes a hash code from attributes:failOp
,passOp
,depthFailOp
,compareOp
,compareMask
,writeMask
,reference
.static VulkanStencilOpState
of(VulkanStencilOp failOp, VulkanStencilOp passOp, VulkanStencilOp depthFailOp, VulkanCompareOp compareOp, int compareMask, int writeMask, int reference)
Construct a new immutableVulkanStencilOpState
instance.VulkanStencilOp
passOp()
int
reference()
java.lang.String
toString()
Prints the immutable valueVulkanStencilOpState
with attribute values.VulkanStencilOpState
withCompareMask(int value)
Copy the current immutable object by setting a value for thecompareMask
attribute.VulkanStencilOpState
withCompareOp(VulkanCompareOp value)
Copy the current immutable object by setting a value for thecompareOp
attribute.VulkanStencilOpState
withDepthFailOp(VulkanStencilOp value)
Copy the current immutable object by setting a value for thedepthFailOp
attribute.VulkanStencilOpState
withFailOp(VulkanStencilOp value)
Copy the current immutable object by setting a value for thefailOp
attribute.VulkanStencilOpState
withPassOp(VulkanStencilOp value)
Copy the current immutable object by setting a value for thepassOp
attribute.VulkanStencilOpState
withReference(int value)
Copy the current immutable object by setting a value for thereference
attribute.VulkanStencilOpState
withWriteMask(int value)
Copy the current immutable object by setting a value for thewriteMask
attribute.int
writeMask()
-
-
-
Method Detail
-
failOp
public VulkanStencilOp failOp()
- Specified by:
failOp
in interfaceVulkanStencilOpStateType
- Returns:
- The action performed on samples that fail the stencil test.
-
passOp
public VulkanStencilOp passOp()
- Specified by:
passOp
in interfaceVulkanStencilOpStateType
- Returns:
- The action performed on samples that pass both the depth and stencil tests.
-
depthFailOp
public VulkanStencilOp depthFailOp()
- Specified by:
depthFailOp
in interfaceVulkanStencilOpStateType
- Returns:
- The action performed on samples that pass the stencil test and fail the depth test.
-
compareOp
public VulkanCompareOp compareOp()
- Specified by:
compareOp
in interfaceVulkanStencilOpStateType
- Returns:
- The comparison operator used in the stencil test.
-
compareMask
public int compareMask()
- Specified by:
compareMask
in interfaceVulkanStencilOpStateType
- Returns:
- The bits of the unsigned integer stencil values participating in the stencil test.
-
writeMask
public int writeMask()
- Specified by:
writeMask
in interfaceVulkanStencilOpStateType
- Returns:
- The bits of the unsigned integer stencil values updated by the stencil test in the stencil framebuffer attachment.
-
reference
public int reference()
- Specified by:
reference
in interfaceVulkanStencilOpStateType
- Returns:
- An integer reference value that is used in the unsigned stencil comparison.
-
withFailOp
public final VulkanStencilOpState withFailOp(VulkanStencilOp value)
Copy the current immutable object by setting a value for thefailOp
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for failOp- Returns:
- A modified copy of the
this
object
-
withPassOp
public final VulkanStencilOpState withPassOp(VulkanStencilOp value)
Copy the current immutable object by setting a value for thepassOp
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for passOp- Returns:
- A modified copy of the
this
object
-
withDepthFailOp
public final VulkanStencilOpState withDepthFailOp(VulkanStencilOp value)
Copy the current immutable object by setting a value for thedepthFailOp
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for depthFailOp- Returns:
- A modified copy of the
this
object
-
withCompareOp
public final VulkanStencilOpState withCompareOp(VulkanCompareOp value)
Copy the current immutable object by setting a value for thecompareOp
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for compareOp- Returns:
- A modified copy of the
this
object
-
withCompareMask
public final VulkanStencilOpState withCompareMask(int value)
Copy the current immutable object by setting a value for thecompareMask
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for compareMask- Returns:
- A modified copy of the
this
object
-
withWriteMask
public final VulkanStencilOpState withWriteMask(int value)
Copy the current immutable object by setting a value for thewriteMask
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for writeMask- Returns:
- A modified copy of the
this
object
-
withReference
public final VulkanStencilOpState withReference(int value)
Copy the current immutable object by setting a value for thereference
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for reference- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanStencilOpState
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:failOp
,passOp
,depthFailOp
,compareOp
,compareMask
,writeMask
,reference
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanStencilOpState
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanStencilOpState of(VulkanStencilOp failOp, VulkanStencilOp passOp, VulkanStencilOp depthFailOp, VulkanCompareOp compareOp, int compareMask, int writeMask, int reference)
Construct a new immutableVulkanStencilOpState
instance.- Parameters:
failOp
- The value for thefailOp
attributepassOp
- The value for thepassOp
attributedepthFailOp
- The value for thedepthFailOp
attributecompareOp
- The value for thecompareOp
attributecompareMask
- The value for thecompareMask
attributewriteMask
- The value for thewriteMask
attributereference
- The value for thereference
attribute- Returns:
- An immutable VulkanStencilOpState instance
-
copyOf
public static VulkanStencilOpState copyOf(VulkanStencilOpStateType instance)
Creates an immutable copy of aVulkanStencilOpStateType
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 VulkanStencilOpState instance
-
builder
public static VulkanStencilOpState.Builder builder()
Creates a builder forVulkanStencilOpState
.- Returns:
- A new VulkanStencilOpState builder
-
-