Class VulkanPipelineDepthStencilStateCreateInfo
java.lang.Object
com.io7m.jcoronado.api.VulkanPipelineDepthStencilStateCreateInfo
- All Implemented Interfaces:
VulkanPipelineDepthStencilStateCreateInfoType
public final class VulkanPipelineDepthStencilStateCreateInfo
extends Object
implements VulkanPipelineDepthStencilStateCreateInfoType
Structure specifying parameters of a newly created pipeline depth stencil state.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanPipelineDepthStencilStateCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionback()builder()Creates a builder forVulkanPipelineDepthStencilStateCreateInfo.Creates an immutable copy of aVulkanPipelineDepthStencilStateCreateInfoTypevalue.booleanbooleanbooleanbooleanThis instance is equal to all instances ofVulkanPipelineDepthStencilStateCreateInfothat have equal attribute values.flags()front()inthashCode()Computes a hash code from attributes:flags,depthTestEnable,depthWriteEnable,depthCompareOp,depthBoundsTestEnable,stencilTestEnable,front,back,minDepthBounds,maxDepthBounds.floatfloatof(Iterable<VulkanPipelineDepthStencilStateCreateFlag> flags, boolean depthTestEnable, boolean depthWriteEnable, VulkanCompareOp depthCompareOp, boolean depthBoundsTestEnable, boolean stencilTestEnable, VulkanStencilOpState front, VulkanStencilOpState back, float minDepthBounds, float maxDepthBounds) Construct a new immutableVulkanPipelineDepthStencilStateCreateInfoinstance.of(Set<VulkanPipelineDepthStencilStateCreateFlag> flags, boolean depthTestEnable, boolean depthWriteEnable, VulkanCompareOp depthCompareOp, boolean depthBoundsTestEnable, boolean stencilTestEnable, VulkanStencilOpState front, VulkanStencilOpState back, float minDepthBounds, float maxDepthBounds) Construct a new immutableVulkanPipelineDepthStencilStateCreateInfoinstance.booleantoString()Prints the immutable valueVulkanPipelineDepthStencilStateCreateInfowith attribute values.withBack(VulkanStencilOpState value) Copy the current immutable object by setting a value for thebackattribute.withDepthBoundsTestEnable(boolean value) Copy the current immutable object by setting a value for thedepthBoundsTestEnableattribute.Copy the current immutable object by setting a value for thedepthCompareOpattribute.withDepthTestEnable(boolean value) Copy the current immutable object by setting a value for thedepthTestEnableattribute.withDepthWriteEnable(boolean value) Copy the current immutable object by setting a value for thedepthWriteEnableattribute.withFlags(VulkanPipelineDepthStencilStateCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.Copy the current immutable object with elements that replace the content offlags.withFront(VulkanStencilOpState value) Copy the current immutable object by setting a value for thefrontattribute.withMaxDepthBounds(float value) Copy the current immutable object by setting a value for themaxDepthBoundsattribute.withMinDepthBounds(float value) Copy the current immutable object by setting a value for theminDepthBoundsattribute.withStencilTestEnable(boolean value) Copy the current immutable object by setting a value for thestencilTestEnableattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
- Creation flags
-
depthTestEnable
public boolean depthTestEnable()- Specified by:
depthTestEnablein interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
trueif depth testing is enabled.
-
depthWriteEnable
public boolean depthWriteEnable()- Specified by:
depthWriteEnablein interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
trueif depth writing is enabled.
-
depthCompareOp
- Specified by:
depthCompareOpin interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
- The comparison operator used in the depth test.
-
depthBoundsTestEnable
public boolean depthBoundsTestEnable()- Specified by:
depthBoundsTestEnablein interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
trueif depth bounds testing is enabled.
-
stencilTestEnable
public boolean stencilTestEnable()- Specified by:
stencilTestEnablein interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
trueif stencil testing is enabled.
-
front
- Specified by:
frontin interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
- The stencil op state for front faces.
-
back
- Specified by:
backin interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
- The stencil op state for back faces.
-
minDepthBounds
public float minDepthBounds()- Specified by:
minDepthBoundsin interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
- The minimum depth for bounds testing
-
maxDepthBounds
public float maxDepthBounds()- Specified by:
maxDepthBoundsin interfaceVulkanPipelineDepthStencilStateCreateInfoType- Returns:
- The maximum depth for bounds testing
-
withFlags
public final VulkanPipelineDepthStencilStateCreateInfo withFlags(VulkanPipelineDepthStencilStateCreateFlag... elements) 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
public final VulkanPipelineDepthStencilStateCreateInfo withFlags(Iterable<VulkanPipelineDepthStencilStateCreateFlag> 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
thisobject
-
withDepthTestEnable
Copy the current immutable object by setting a value for thedepthTestEnableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthTestEnable- Returns:
- A modified copy of the
thisobject
-
withDepthWriteEnable
Copy the current immutable object by setting a value for thedepthWriteEnableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthWriteEnable- Returns:
- A modified copy of the
thisobject
-
withDepthCompareOp
Copy the current immutable object by setting a value for thedepthCompareOpattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthCompareOp- Returns:
- A modified copy of the
thisobject
-
withDepthBoundsTestEnable
Copy the current immutable object by setting a value for thedepthBoundsTestEnableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for depthBoundsTestEnable- Returns:
- A modified copy of the
thisobject
-
withStencilTestEnable
Copy the current immutable object by setting a value for thestencilTestEnableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for stencilTestEnable- Returns:
- A modified copy of the
thisobject
-
withFront
Copy the current immutable object by setting a value for thefrontattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for front- Returns:
- A modified copy of the
thisobject
-
withBack
Copy the current immutable object by setting a value for thebackattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for back- Returns:
- A modified copy of the
thisobject
-
withMinDepthBounds
Copy the current immutable object by setting a value for theminDepthBoundsattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for minDepthBounds- Returns:
- A modified copy of the
thisobject
-
withMaxDepthBounds
Copy the current immutable object by setting a value for themaxDepthBoundsattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxDepthBounds- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanPipelineDepthStencilStateCreateInfo of(Set<VulkanPipelineDepthStencilStateCreateFlag> flags, boolean depthTestEnable, boolean depthWriteEnable, VulkanCompareOp depthCompareOp, boolean depthBoundsTestEnable, boolean stencilTestEnable, VulkanStencilOpState front, VulkanStencilOpState back, float minDepthBounds, float maxDepthBounds) Construct a new immutableVulkanPipelineDepthStencilStateCreateInfoinstance.- Parameters:
flags- The value for theflagsattributedepthTestEnable- The value for thedepthTestEnableattributedepthWriteEnable- The value for thedepthWriteEnableattributedepthCompareOp- The value for thedepthCompareOpattributedepthBoundsTestEnable- The value for thedepthBoundsTestEnableattributestencilTestEnable- The value for thestencilTestEnableattributefront- The value for thefrontattributeback- The value for thebackattributeminDepthBounds- The value for theminDepthBoundsattributemaxDepthBounds- The value for themaxDepthBoundsattribute- Returns:
- An immutable VulkanPipelineDepthStencilStateCreateInfo instance
-
of
public static VulkanPipelineDepthStencilStateCreateInfo of(Iterable<VulkanPipelineDepthStencilStateCreateFlag> flags, boolean depthTestEnable, boolean depthWriteEnable, VulkanCompareOp depthCompareOp, boolean depthBoundsTestEnable, boolean stencilTestEnable, VulkanStencilOpState front, VulkanStencilOpState back, float minDepthBounds, float maxDepthBounds) Construct a new immutableVulkanPipelineDepthStencilStateCreateInfoinstance.- Parameters:
flags- The value for theflagsattributedepthTestEnable- The value for thedepthTestEnableattributedepthWriteEnable- The value for thedepthWriteEnableattributedepthCompareOp- The value for thedepthCompareOpattributedepthBoundsTestEnable- The value for thedepthBoundsTestEnableattributestencilTestEnable- The value for thestencilTestEnableattributefront- The value for thefrontattributeback- The value for thebackattributeminDepthBounds- The value for theminDepthBoundsattributemaxDepthBounds- The value for themaxDepthBoundsattribute- Returns:
- An immutable VulkanPipelineDepthStencilStateCreateInfo instance
-
copyOf
public static VulkanPipelineDepthStencilStateCreateInfo copyOf(VulkanPipelineDepthStencilStateCreateInfoType instance) Creates an immutable copy of aVulkanPipelineDepthStencilStateCreateInfoTypevalue. 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 VulkanPipelineDepthStencilStateCreateInfo instance
-
builder
Creates a builder forVulkanPipelineDepthStencilStateCreateInfo.VulkanPipelineDepthStencilStateCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanPipelineDepthStencilStateCreateFlag) //flagselements .setDepthTestEnable(boolean) // requireddepthTestEnable.setDepthWriteEnable(boolean) // requireddepthWriteEnable.setDepthCompareOp(com.io7m.jcoronado.api.VulkanCompareOp) // requireddepthCompareOp.setDepthBoundsTestEnable(boolean) // requireddepthBoundsTestEnable.setStencilTestEnable(boolean) // requiredstencilTestEnable.setFront(com.io7m.jcoronado.api.VulkanStencilOpState) // requiredfront.setBack(com.io7m.jcoronado.api.VulkanStencilOpState) // requiredback.setMinDepthBounds(float) // requiredminDepthBounds.setMaxDepthBounds(float) // requiredmaxDepthBounds.build();- Returns:
- A new VulkanPipelineDepthStencilStateCreateInfo builder
-