Record Class StencilTest
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.stencil.StencilTest
- Record Components:
front
- The stencil test settings for front-faces (based on vertex winding).back
- The stencil test settings for back-faces (based on vertex winding).readMask
- the bitmask to apply to the current stencil buffer value before it is used in the stencil test.writeMask
- the bitmask to apply to the stencil buffer value before writing it back to the stencil buffer after the test.referenceValue
- The reference value that will be used in comparisons and written to the stencil buffer (depending on settings). Shaders can overwrite this per-fragment.
public record StencilTest(StencilPerFaceTest front, StencilPerFaceTest back, int readMask, int writeMask, int referenceValue)
extends Record
Describes the stencil test state for the render pipeline.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StencilPerFaceTest
The field for theback
record component.static int
static int
static int
private final StencilPerFaceTest
The field for thefront
record component.private final int
The field for thereadMask
record component.private final int
The field for thereferenceValue
record component.private final int
The field for thewriteMask
record component. -
Constructor Summary
ConstructorsConstructorDescriptionStencilTest
(StencilPerFaceTest test, int readMask, int writeMask, int referenceValue) StencilTest
(StencilPerFaceTest front, StencilPerFaceTest back, int readMask, int writeMask, int referenceValue) Creates an instance of aStencilTest
record class. -
Method Summary
Modifier and TypeMethodDescriptionback()
Returns the value of theback
record component.final boolean
Indicates whether some other object is "equal to" this one.front()
Returns the value of thefront
record component.final int
hashCode()
Returns a hash code value for this object.int
readMask()
Returns the value of thereadMask
record component.int
Returns the value of thereferenceValue
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of thewriteMask
record component.
-
Field Details
-
front
The field for thefront
record component. -
back
The field for theback
record component. -
readMask
private final int readMaskThe field for thereadMask
record component. -
writeMask
private final int writeMaskThe field for thewriteMask
record component. -
referenceValue
private final int referenceValueThe field for thereferenceValue
record component. -
DEFAULT_READ_MASK
public static int DEFAULT_READ_MASK -
DEFAULT_WRITE_MASK
public static int DEFAULT_WRITE_MASK -
DEFAULT_REFERENCE_VALUE
public static int DEFAULT_REFERENCE_VALUE
-
-
Constructor Details
-
StencilTest
-
StencilTest
public StencilTest(StencilPerFaceTest front, StencilPerFaceTest back, int readMask, int writeMask, int referenceValue) Creates an instance of aStencilTest
record class.- Parameters:
front
- the value for thefront
record componentback
- the value for theback
record componentreadMask
- the value for thereadMask
record componentwriteMask
- the value for thewriteMask
record componentreferenceValue
- the value for thereferenceValue
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
front
Returns the value of thefront
record component.- Returns:
- the value of the
front
record component
-
back
Returns the value of theback
record component.- Returns:
- the value of the
back
record component
-
readMask
public int readMask()Returns the value of thereadMask
record component.- Returns:
- the value of the
readMask
record component
-
writeMask
public int writeMask()Returns the value of thewriteMask
record component.- Returns:
- the value of the
writeMask
record component
-
referenceValue
public int referenceValue()Returns the value of thereferenceValue
record component.- Returns:
- the value of the
referenceValue
record component
-