Class VulkanAttachmentDescription
java.lang.Object
com.io7m.jcoronado.api.VulkanAttachmentDescription
- All Implemented Interfaces:
VulkanAttachmentDescriptionType
public final class VulkanAttachmentDescription
extends Object
implements VulkanAttachmentDescriptionType
Structure specifying an attachment description
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanAttachmentDescription. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanAttachmentDescription.static VulkanAttachmentDescriptioncopyOf(VulkanAttachmentDescriptionType instance) Creates an immutable copy of aVulkanAttachmentDescriptionTypevalue.booleanThis instance is equal to all instances ofVulkanAttachmentDescriptionthat have equal attribute values.flags()format()inthashCode()Computes a hash code from attributes:flags,format,samples,loadOp,storeOp,stencilLoadOp,stencilStoreOp,initialLayout,finalLayout.loadOp()static VulkanAttachmentDescriptionof(Iterable<VulkanAttachmentDescriptionFlag> flags, VulkanFormat format, VulkanSampleCountFlag samples, VulkanAttachmentLoadOp loadOp, VulkanAttachmentStoreOp storeOp, VulkanAttachmentLoadOp stencilLoadOp, VulkanAttachmentStoreOp stencilStoreOp, VulkanImageLayout initialLayout, VulkanImageLayout finalLayout) Construct a new immutableVulkanAttachmentDescriptioninstance.static VulkanAttachmentDescriptionof(Set<VulkanAttachmentDescriptionFlag> flags, VulkanFormat format, VulkanSampleCountFlag samples, VulkanAttachmentLoadOp loadOp, VulkanAttachmentStoreOp storeOp, VulkanAttachmentLoadOp stencilLoadOp, VulkanAttachmentStoreOp stencilStoreOp, VulkanImageLayout initialLayout, VulkanImageLayout finalLayout) Construct a new immutableVulkanAttachmentDescriptioninstance.samples()storeOp()toString()Prints the immutable valueVulkanAttachmentDescriptionwith attribute values.withFinalLayout(VulkanImageLayout value) Copy the current immutable object by setting a value for thefinalLayoutattribute.withFlags(VulkanAttachmentDescriptionFlag... elements) Copy the current immutable object with elements that replace the content offlags.withFlags(Iterable<VulkanAttachmentDescriptionFlag> elements) Copy the current immutable object with elements that replace the content offlags.withFormat(VulkanFormat value) Copy the current immutable object by setting a value for theformatattribute.Copy the current immutable object by setting a value for theinitialLayoutattribute.withLoadOp(VulkanAttachmentLoadOp value) Copy the current immutable object by setting a value for theloadOpattribute.withSamples(VulkanSampleCountFlag value) Copy the current immutable object by setting a value for thesamplesattribute.Copy the current immutable object by setting a value for thestencilLoadOpattribute.Copy the current immutable object by setting a value for thestencilStoreOpattribute.Copy the current immutable object by setting a value for thestoreOpattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVulkanAttachmentDescriptionType- Returns:
- flags specifying additional properties of the attachment.
-
format
- Specified by:
formatin interfaceVulkanAttachmentDescriptionType- Returns:
- the format of the image view that will be used for the attachment.
-
samples
- Specified by:
samplesin interfaceVulkanAttachmentDescriptionType- Returns:
- the number of samples of the image.
-
loadOp
- Specified by:
loadOpin interfaceVulkanAttachmentDescriptionType- Returns:
- A value specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used.
-
storeOp
- Specified by:
storeOpin interfaceVulkanAttachmentDescriptionType- Returns:
- A value specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used.
-
stencilLoadOp
- Specified by:
stencilLoadOpin interfaceVulkanAttachmentDescriptionType- Returns:
- A value specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used.
-
stencilStoreOp
- Specified by:
stencilStoreOpin interfaceVulkanAttachmentDescriptionType- Returns:
- A value specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used.
-
initialLayout
- Specified by:
initialLayoutin interfaceVulkanAttachmentDescriptionType- Returns:
- The layout the attachment image subresource will be in when a render pass instance begins.
-
finalLayout
- Specified by:
finalLayoutin interfaceVulkanAttachmentDescriptionType- Returns:
- The layout the attachment image subresource will be transitioned to when a render pass instance ends. During a render pass instance, an attachment can use a different layout in each subpass, if desired.
-
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
public final VulkanAttachmentDescription withFlags(Iterable<VulkanAttachmentDescriptionFlag> 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
-
withFormat
Copy the current immutable object by setting a value for theformatattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for format- Returns:
- A modified copy of the
thisobject
-
withSamples
Copy the current immutable object by setting a value for thesamplesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for samples- Returns:
- A modified copy of the
thisobject
-
withLoadOp
Copy the current immutable object by setting a value for theloadOpattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for loadOp- Returns:
- A modified copy of the
thisobject
-
withStoreOp
Copy the current immutable object by setting a value for thestoreOpattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for storeOp- Returns:
- A modified copy of the
thisobject
-
withStencilLoadOp
Copy the current immutable object by setting a value for thestencilLoadOpattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for stencilLoadOp- Returns:
- A modified copy of the
thisobject
-
withStencilStoreOp
Copy the current immutable object by setting a value for thestencilStoreOpattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for stencilStoreOp- Returns:
- A modified copy of the
thisobject
-
withInitialLayout
Copy the current immutable object by setting a value for theinitialLayoutattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for initialLayout- Returns:
- A modified copy of the
thisobject
-
withFinalLayout
Copy the current immutable object by setting a value for thefinalLayoutattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for finalLayout- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanAttachmentDescription of(Set<VulkanAttachmentDescriptionFlag> flags, VulkanFormat format, VulkanSampleCountFlag samples, VulkanAttachmentLoadOp loadOp, VulkanAttachmentStoreOp storeOp, VulkanAttachmentLoadOp stencilLoadOp, VulkanAttachmentStoreOp stencilStoreOp, VulkanImageLayout initialLayout, VulkanImageLayout finalLayout) Construct a new immutableVulkanAttachmentDescriptioninstance.- Parameters:
flags- The value for theflagsattributeformat- The value for theformatattributesamples- The value for thesamplesattributeloadOp- The value for theloadOpattributestoreOp- The value for thestoreOpattributestencilLoadOp- The value for thestencilLoadOpattributestencilStoreOp- The value for thestencilStoreOpattributeinitialLayout- The value for theinitialLayoutattributefinalLayout- The value for thefinalLayoutattribute- Returns:
- An immutable VulkanAttachmentDescription instance
-
of
public static VulkanAttachmentDescription of(Iterable<VulkanAttachmentDescriptionFlag> flags, VulkanFormat format, VulkanSampleCountFlag samples, VulkanAttachmentLoadOp loadOp, VulkanAttachmentStoreOp storeOp, VulkanAttachmentLoadOp stencilLoadOp, VulkanAttachmentStoreOp stencilStoreOp, VulkanImageLayout initialLayout, VulkanImageLayout finalLayout) Construct a new immutableVulkanAttachmentDescriptioninstance.- Parameters:
flags- The value for theflagsattributeformat- The value for theformatattributesamples- The value for thesamplesattributeloadOp- The value for theloadOpattributestoreOp- The value for thestoreOpattributestencilLoadOp- The value for thestencilLoadOpattributestencilStoreOp- The value for thestencilStoreOpattributeinitialLayout- The value for theinitialLayoutattributefinalLayout- The value for thefinalLayoutattribute- Returns:
- An immutable VulkanAttachmentDescription instance
-
copyOf
Creates an immutable copy of aVulkanAttachmentDescriptionTypevalue. 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 VulkanAttachmentDescription instance
-
builder
Creates a builder forVulkanAttachmentDescription.VulkanAttachmentDescription.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanAttachmentDescriptionFlag) //flagselements .setFormat(com.io7m.jcoronado.api.VulkanFormat) // requiredformat.setSamples(com.io7m.jcoronado.api.VulkanSampleCountFlag) // requiredsamples.setLoadOp(com.io7m.jcoronado.api.VulkanAttachmentLoadOp) // requiredloadOp.setStoreOp(com.io7m.jcoronado.api.VulkanAttachmentStoreOp) // requiredstoreOp.setStencilLoadOp(com.io7m.jcoronado.api.VulkanAttachmentLoadOp) // requiredstencilLoadOp.setStencilStoreOp(com.io7m.jcoronado.api.VulkanAttachmentStoreOp) // requiredstencilStoreOp.setInitialLayout(com.io7m.jcoronado.api.VulkanImageLayout) // requiredinitialLayout.setFinalLayout(com.io7m.jcoronado.api.VulkanImageLayout) // requiredfinalLayout.build();- Returns:
- A new VulkanAttachmentDescription builder
-