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
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeVulkanFramebufferCreateInfo
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forVulkanFramebufferCreateInfo
.static VulkanFramebufferCreateInfo
copyOf
(VulkanFramebufferCreateInfoType instance) Creates an immutable copy of aVulkanFramebufferCreateInfoType
value.boolean
This instance is equal to all instances ofVulkanFramebufferCreateInfo
that have equal attribute values.flags()
int
hashCode()
Computes a hash code from attributes:flags
,renderPass
,attachments
,width
,height
,layers
.int
height()
int
layers()
static VulkanFramebufferCreateInfo
of
(Iterable<VulkanFramebufferCreateFlag> flags, VulkanRenderPassType renderPass, Iterable<? extends VulkanImageViewType> attachments, int width, int height, int layers) Construct a new immutableVulkanFramebufferCreateInfo
instance.static VulkanFramebufferCreateInfo
of
(Set<VulkanFramebufferCreateFlag> flags, VulkanRenderPassType renderPass, List<VulkanImageViewType> attachments, int width, int height, int layers) Construct a new immutableVulkanFramebufferCreateInfo
instance.toString()
Prints the immutable valueVulkanFramebufferCreateInfo
with attribute values.int
width()
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 theheight
attribute.withLayers
(int value) Copy the current immutable object by setting a value for thelayers
attribute.Copy the current immutable object by setting a value for therenderPass
attribute.withWidth
(int value) Copy the current immutable object by setting a value for thewidth
attribute.
-
Method Details
-
flags
- Specified by:
flags
in interfaceVulkanFramebufferCreateInfoType
- Returns:
- Flags specifying how the framebuffer will be generated.
-
renderPass
- Specified by:
renderPass
in interfaceVulkanFramebufferCreateInfoType
- Returns:
- A render pass that defines what render passes with which the framebuffer will be compatible.
-
attachments
- Specified by:
attachments
in 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:
width
in interfaceVulkanFramebufferCreateInfoType
- Returns:
- The width of the framebuffer
-
height
public int height()- Specified by:
height
in interfaceVulkanFramebufferCreateInfoType
- Returns:
- The height of the framebuffer
-
layers
public int layers()- Specified by:
layers
in 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
this
object
-
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
this
object
-
withRenderPass
Copy the current immutable object by setting a value for therenderPass
attribute. 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
this
object
-
withAttachments
Copy the current immutable object with elements that replace the content ofattachments
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
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
this
object
-
withWidth
Copy the current immutable object by setting a value for thewidth
attribute. 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
this
object
-
withHeight
Copy the current immutable object by setting a value for theheight
attribute. 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
this
object
-
withLayers
Copy the current immutable object by setting a value for thelayers
attribute. 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
this
object
-
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 immutableVulkanFramebufferCreateInfo
instance.- Parameters:
flags
- The value for theflags
attributerenderPass
- The value for therenderPass
attributeattachments
- The value for theattachments
attributewidth
- The value for thewidth
attributeheight
- The value for theheight
attributelayers
- The value for thelayers
attribute- 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 immutableVulkanFramebufferCreateInfo
instance.- Parameters:
flags
- The value for theflags
attributerenderPass
- The value for therenderPass
attributeattachments
- The value for theattachments
attributewidth
- The value for thewidth
attributeheight
- The value for theheight
attributelayers
- The value for thelayers
attribute- Returns:
- An immutable VulkanFramebufferCreateInfo instance
-
copyOf
Creates an immutable copy of aVulkanFramebufferCreateInfoType
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 VulkanFramebufferCreateInfo instance
-
builder
Creates a builder forVulkanFramebufferCreateInfo
.VulkanFramebufferCreateInfo.builder() .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanFramebufferCreateFlag) //
flags
elements .setRenderPass(com.io7m.jcoronado.api.VulkanRenderPassType) // requiredrenderPass
.addAttachments|addAllAttachments(com.io7m.jcoronado.api.VulkanImageViewType) //attachments
elements .setWidth(int) // requiredwidth
.setHeight(int) // requiredheight
.setLayers(int) // requiredlayers
.build();- Returns:
- A new VulkanFramebufferCreateInfo builder
-