LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::AttachmentClear Struct Reference

Attachment clear command structure. More...

#include <CommandBufferFlags.h>

Public Member Functions

 AttachmentClear ()=default
 AttachmentClear (const float color[4], std::uint32_t colorAttachment)
 Constructor for a color attachment clear command.
 AttachmentClear (float depth)
 Constructor for a depth attachment clear command.
 AttachmentClear (std::uint32_t stencil)
 Constructor for a stencil attachment clear command.
 AttachmentClear (float depth, std::uint32_t stencil)
 Constructor for a depth-stencil attachment clear command.

Public Attributes

long flags = 0
 Specifies the clear buffer flags.
std::uint32_t colorAttachment = 0
 Specifies the index of the color attachment within the active render target. By default 0.
ClearValue clearValue
 Clear value for color, depth, and stencil buffers.

Detailed Description

Attachment clear command structure.

See also
CommandBuffer::ClearAttachments

Constructor & Destructor Documentation

◆ AttachmentClear() [1/5]

LLGL::AttachmentClear::AttachmentClear ( )
default

◆ AttachmentClear() [2/5]

LLGL::AttachmentClear::AttachmentClear ( const float color[4],
std::uint32_t colorAttachment )
inline

Constructor for a color attachment clear command.

◆ AttachmentClear() [3/5]

LLGL::AttachmentClear::AttachmentClear ( float depth)
inline

Constructor for a depth attachment clear command.

◆ AttachmentClear() [4/5]

LLGL::AttachmentClear::AttachmentClear ( std::uint32_t stencil)
inline

Constructor for a stencil attachment clear command.

◆ AttachmentClear() [5/5]

LLGL::AttachmentClear::AttachmentClear ( float depth,
std::uint32_t stencil )
inline

Constructor for a depth-stencil attachment clear command.

Member Data Documentation

◆ clearValue

ClearValue LLGL::AttachmentClear::clearValue

Clear value for color, depth, and stencil buffers.

◆ colorAttachment

std::uint32_t LLGL::AttachmentClear::colorAttachment = 0

Specifies the index of the color attachment within the active render target. By default 0.

Remarks
This is ignored if the ClearFlags::Color bit is not set in the 'flags' member.
See also
flags

◆ flags

long LLGL::AttachmentClear::flags = 0

Specifies the clear buffer flags.

Remarks
This can be a bitwise OR combination of the "ClearFlags" enumeration entries. However, if the ClearFlags::Color bit is set, all other bits are ignored. It is recommended to clear depth- and stencil buffers always simultaneously if both are meant to be cleared (i.e. use ClearFlags::DepthStencil in this case).
See also
ClearFlags

The documentation for this struct was generated from the following file: