core::data::framebuffer_t::attachment class final

describes a single rendertarget in a framebuffer.

all data contained within this object is not guaranteed to be loaded, this includes the psl::UID of the core::gfx::texture_t. You should take caution when calling methods that manipulate the contained resources for this reason.

types

classes

description
describes how the rendertarget should be loaded, stored, it's sample count, and what transition layouts it should go through.

constructors, destructors, conversion operators

attachment
constructs an attachment based on the given texture and values.
public
operator core::gfx::attachment
returns a core::gfx::attachment based on the internal settings. This is a passthrough method to the core::data::framebuffer_t::attachment::description instance.
const public noexcept

member-functions

texture
returns the psl::UID assigned to this render attachment.
const public
clear_value
returns the clear value assigned to this attachment.
const public
shared
signifies if this specific attachment duplicated when the framebuffer's image count is larger than 1.
const public

Function documentation

core::data::framebuffer_t::attachment::attachment(const psl::UID& texture, const core::gfx::clear_value& clear_col, core::gfx::attachment descr, bool shared = false)

Brief

constructs an attachment based on the given texture and values.

Details

Parameters
texture in a psl::UID pointing to a valid (known or constructed), core::ivk::texture_t object.
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::data::framebuffer_t::attachment::description.
shared in value indicating if this render attachment is shared within this framebuffer (see core::data::framebuffer_t::attachment::shared() for more info).

core::data::framebuffer_t::attachment::operator core::gfx::attachment() const noexcept

Brief

returns a core::gfx::attachment based on the internal settings. This is a passthrough method to the core::data::framebuffer_t::attachment::description instance.

Returns a core::gfx::attachment based on the internal settings.

const psl::UID& core::data::framebuffer_t::attachment::texture() const

Brief

returns the psl::UID assigned to this render attachment.

Details

Returns the psl::UID assigned to this render attachment.

const core::gfx::clear_value& core::data::framebuffer_t::attachment::clear_value() const

Brief

returns the clear value assigned to this attachment.

Returns the clear value assigned to this attachment.

bool core::data::framebuffer_t::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).