Magnum::Vk::RenderPassBeginInfo class new in Git master

Render pass begin info.

Wraps a VkRenderPassBeginInfo. See Render pass recording for more information.

Constructors, destructors, conversion operators

RenderPassBeginInfo(VkRenderPass renderPass, VkFramebuffer framebuffer, const Range2Di& renderArea) explicit
Constructor.
RenderPassBeginInfo(VkRenderPass renderPass, Framebuffer& framebuffer) explicit
Construct for a render pass spanning the whole framebuffer area.
RenderPassBeginInfo(NoInitT) explicit noexcept
Construct without initializing the contents.
RenderPassBeginInfo(const VkRenderPassBeginInfo& info) explicit
Construct from existing data.
RenderPassBeginInfo(const RenderPassBeginInfo&) deleted
Copying is not allowed.
RenderPassBeginInfo(RenderPassBeginInfo&& other) noexcept
Move constructor.
operator const VkRenderPassBeginInfo*() const

Public functions

auto operator=(const RenderPassBeginInfo&) -> RenderPassBeginInfo& deleted
Copying is not allowed.
auto operator=(RenderPassBeginInfo&& other) -> RenderPassBeginInfo& noexcept
Move assignment.
auto clearColor(UnsignedInt attachment, const Color4& color) -> RenderPassBeginInfo&
Clear a floating-point or normalized color attachment.
auto clearColor(UnsignedInt attachment, const Vector4i& color) -> RenderPassBeginInfo&
Clear a signed integral color attachment.
auto clearColor(UnsignedInt attachment, const Vector4ui& color) -> RenderPassBeginInfo&
Clear an unsigned integral color attachment.
auto clearDepthStencil(UnsignedInt attachment, Float depth, UnsignedInt stencil) -> RenderPassBeginInfo&
Clear a depth/stencil attachment.
auto operator*() -> VkRenderPassBeginInfo&
Underlying VkRenderPassBeginInfo structure.
auto operator*() const -> const VkRenderPassBeginInfo&
auto operator->() -> VkRenderPassBeginInfo*
auto operator->() const -> const VkRenderPassBeginInfo*

Function documentation

Magnum::Vk::RenderPassBeginInfo::RenderPassBeginInfo(VkRenderPass renderPass, VkFramebuffer framebuffer, const Range2Di& renderArea) explicit

Constructor.

Parameters
renderPass A RenderPass or a raw Vulkan render pass handle to begin an instance of
framebuffer A Framebuffer or a raw Vulkan framebuffer containing the attachments used with renderPass
renderArea Render area affected by the render pass instance

The following VkRenderPassBeginInfo fields are pre-filled in addition to sType, everything else is zero-filled:

  • renderPass
  • framebuffer
  • renderArea

If there are attachments with AttachmentLoadOperation::Clear passed to RenderPassCreateInfo::setAttachments() of renderPass, you need to call clearColor() / clearDepthStencil() with an attachment index corresponding to each of them.

Magnum::Vk::RenderPassBeginInfo::RenderPassBeginInfo(VkRenderPass renderPass, Framebuffer& framebuffer) explicit

Construct for a render pass spanning the whole framebuffer area.

Equivalent to calling RenderPassBeginInfo(VkRenderPass, VkFramebuffer, const Range2Di&) with renderArea spanning the whole Framebuffer::size().

Magnum::Vk::RenderPassBeginInfo::RenderPassBeginInfo(NoInitT) explicit noexcept

Construct without initializing the contents.

Note that not even the sType field is set — the structure has to be fully initialized afterwards in order to be usable.

Magnum::Vk::RenderPassBeginInfo::RenderPassBeginInfo(const VkRenderPassBeginInfo& info) explicit

Construct from existing data.

Copies the existing values verbatim, pointers are kept unchanged without taking over the ownership. Modifying the newly created instance will not modify the original data nor the pointed-to data.

Magnum::Vk::RenderPassBeginInfo::operator const VkRenderPassBeginInfo*() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

RenderPassBeginInfo& Magnum::Vk::RenderPassBeginInfo::clearColor(UnsignedInt attachment, const Color4& color)

Clear a floating-point or normalized color attachment.

Returns Reference to self (for method chaining)

RenderPassBeginInfo& Magnum::Vk::RenderPassBeginInfo::clearColor(UnsignedInt attachment, const Vector4i& color)

Clear a signed integral color attachment.

Returns Reference to self (for method chaining)

RenderPassBeginInfo& Magnum::Vk::RenderPassBeginInfo::clearColor(UnsignedInt attachment, const Vector4ui& color)

Clear an unsigned integral color attachment.

Returns Reference to self (for method chaining)

RenderPassBeginInfo& Magnum::Vk::RenderPassBeginInfo::clearDepthStencil(UnsignedInt attachment, Float depth, UnsignedInt stencil)

Clear a depth/stencil attachment.

Returns Reference to self (for method chaining)

If the attachment is not a combined depth/stencil format, the unused value is ignored.

const VkRenderPassBeginInfo& Magnum::Vk::RenderPassBeginInfo::operator*() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

VkRenderPassBeginInfo* Magnum::Vk::RenderPassBeginInfo::operator->()

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const VkRenderPassBeginInfo* Magnum::Vk::RenderPassBeginInfo::operator->() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.