class final
attachmentdescribes a single rendertarget in a framebuffer.
all data contained within this object is not guaranteed to be loaded, this includes the UID of the core::
types
classes
constructors, destructors, conversion operators
member-functions
Function documentation
core:: data:: framebuffer:: attachment:: attachment(const UID& texture,
const vk::ClearValue& clear_col,
vk::AttachmentDescription descr,
bool shared = false)
Brief
constructs an attachment based on the given texture and values.
Details
Parameters | |
---|---|
texture in | a UID pointing to a valid (known or constructed), core:: |
clear_col in | the clear value to assign to this render texture. |
descr in | the attachment description that will be used to construct the core:: |
shared in | value indicating if this render attachment is shared within this framebuffer (see core:: |
const UID& core:: data:: framebuffer:: attachment:: texture() const
Brief
returns the UID assigned to this render attachment.
Details
Returns | the UID assigned to this render attachment. |
---|
const vk::ClearValue& core:: data:: framebuffer:: attachment:: clear_value() const
Brief
returns the clear value assigned to this attachment.
Returns | the clear value assigned to this attachment. |
---|
vk::AttachmentDescription core:: data:: framebuffer:: attachment:: vkDescription() const
Brief
returns a vk::AttachmentDescription based on the internal settings. This is a passthrough method to the core::
Returns | a vk::AttachmentDescription based on the internal settings. |
---|
bool core:: data:: framebuffer:: attachment:: shared() const
Brief
signifies if this specific attachment duplicated when the framebuffer's image count is larger than 1.
Details
Sometimes you don't need a render attachment to have a unique instance per framebuffer entry (for example depth testing/texture in a double buffer scenario). in this case you can set this render attachment to be "shared", a flag that will tell the implementation that rather than creating a new instance for when the framebuffer count is larger than 1, it should instead reuse the current one.
Returns | true if this attachment is duplicated (true) or not (false). |
---|