Class VulkanFramebufferCreateInfo
java.lang.Object
com.io7m.jcoronado.api.VulkanFramebufferCreateInfo
- All Implemented Interfaces:
VulkanFramebufferCreateInfoType
public final class VulkanFramebufferCreateInfo
extends Object
implements VulkanFramebufferCreateInfoType
Structure specifying parameters of a newly created framebuffer.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVulkanFramebufferCreateInfo. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVulkanFramebufferCreateInfo.static VulkanFramebufferCreateInfocopyOf(VulkanFramebufferCreateInfoType instance) Creates an immutable copy of aVulkanFramebufferCreateInfoTypevalue.booleanThis instance is equal to all instances ofVulkanFramebufferCreateInfothat have equal attribute values.flags()inthashCode()Computes a hash code from attributes:flags,renderPass,attachments,width,height,layers.intheight()intlayers()static VulkanFramebufferCreateInfoof(Iterable<VulkanFramebufferCreateFlag> flags, VulkanRenderPassType renderPass, Iterable<? extends VulkanImageViewType> attachments, int width, int height, int layers) Construct a new immutableVulkanFramebufferCreateInfoinstance.static VulkanFramebufferCreateInfoof(Set<VulkanFramebufferCreateFlag> flags, VulkanRenderPassType renderPass, List<VulkanImageViewType> attachments, int width, int height, int layers) Construct a new immutableVulkanFramebufferCreateInfoinstance.toString()Prints the immutable valueVulkanFramebufferCreateInfowith attribute values.intwidth()withAttachments(VulkanImageViewType... elements) Copy the current immutable object with elements that replace the content ofattachments.withAttachments(Iterable<? extends VulkanImageViewType> elements) Copy the current immutable object with elements that replace the content ofattachments.withFlags(VulkanFramebufferCreateFlag... elements) Copy the current immutable object with elements that replace the content offlags.withFlags(Iterable<VulkanFramebufferCreateFlag> elements) Copy the current immutable object with elements that replace the content offlags.withHeight(int value) Copy the current immutable object by setting a value for theheightattribute.withLayers(int value) Copy the current immutable object by setting a value for thelayersattribute.Copy the current immutable object by setting a value for therenderPassattribute.withWidth(int value) Copy the current immutable object by setting a value for thewidthattribute.
-
Method Details
-
flags
- Specified by:
flagsin interfaceVulkanFramebufferCreateInfoType- Returns:
- Flags specifying how the framebuffer will be generated.
-
renderPass
- Specified by:
renderPassin interfaceVulkanFramebufferCreateInfoType- Returns:
- A render pass that defines what render passes with which the framebuffer will be compatible.
-
attachments
- Specified by:
attachmentsin interfaceVulkanFramebufferCreateInfoType- Returns:
- A list of image view handles, each of which will be used as the corresponding attachment in a render pass instance.
-
width
public int width()- Specified by:
widthin interfaceVulkanFramebufferCreateInfoType- Returns:
- The width of the framebuffer
-
height
public int height()- Specified by:
heightin interfaceVulkanFramebufferCreateInfoType- Returns:
- The height of the framebuffer
-
layers
public int layers()- Specified by:
layersin interfaceVulkanFramebufferCreateInfoType- Returns:
- The number of layers in the framebuffer
-
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
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
-
withRenderPass
Copy the current immutable object by setting a value for therenderPassattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for renderPass- Returns:
- A modified copy of the
thisobject
-
withAttachments
Copy the current immutable object with elements that replace the content ofattachments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAttachments
public final VulkanFramebufferCreateInfo withAttachments(Iterable<? extends VulkanImageViewType> elements) Copy the current immutable object with elements that replace the content ofattachments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of attachments elements to set- Returns:
- A modified copy of
thisobject
-
withWidth
Copy the current immutable object by setting a value for thewidthattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for width- Returns:
- A modified copy of the
thisobject
-
withHeight
Copy the current immutable object by setting a value for theheightattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for height- Returns:
- A modified copy of the
thisobject
-
withLayers
Copy the current immutable object by setting a value for thelayersattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for layers- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
-
toString
-
of
public static VulkanFramebufferCreateInfo of(Set<VulkanFramebufferCreateFlag> flags, VulkanRenderPassType renderPass, List<VulkanImageViewType> attachments, int width, int height, int layers) Construct a new immutableVulkanFramebufferCreateInfoinstance.- Parameters:
flags- The value for theflagsattributerenderPass- The value for therenderPassattributeattachments- The value for theattachmentsattributewidth- The value for thewidthattributeheight- The value for theheightattributelayers- The value for thelayersattribute- Returns:
- An immutable VulkanFramebufferCreateInfo instance
-
of
public static VulkanFramebufferCreateInfo of(Iterable<VulkanFramebufferCreateFlag> flags, VulkanRenderPassType renderPass, Iterable<? extends VulkanImageViewType> attachments, int width, int height, int layers) Construct a new immutableVulkanFramebufferCreateInfoinstance.- Parameters:
flags- The value for theflagsattributerenderPass- The value for therenderPassattributeattachments- The value for theattachmentsattributewidth- The value for thewidthattributeheight- The value for theheightattributelayers- The value for thelayersattribute- Returns:
- An immutable VulkanFramebufferCreateInfo instance
-
copyOf
Creates an immutable copy of aVulkanFramebufferCreateInfoTypevalue. 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 VulkanFramebufferCreateInfo instance
-
builder
Creates a builder forVulkanFramebufferCreateInfo.VulkanFramebufferCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanFramebufferCreateFlag) //flagselements .setRenderPass(com.io7m.jcoronado.api.VulkanRenderPassType) // requiredrenderPass.addAttachments|addAllAttachments(com.io7m.jcoronado.api.VulkanImageViewType) //attachmentselements .setWidth(int) // requiredwidth.setHeight(int) // requiredheight.setLayers(int) // requiredlayers.build();- Returns:
- A new VulkanFramebufferCreateInfo builder
-