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

Render target attachment descriptor structure. More...

#include <RenderTargetFlags.h>

Public Member Functions

 AttachmentDescriptor ()=default
 AttachmentDescriptor (Format format)
 Constructor for the specified depth-, or stencil attachment.
 AttachmentDescriptor (Texture *texture, std::uint32_t mipLevel=0, std::uint32_t arrayLayer=0)
 Constructor for the specified depth-, stencil-, or color attachment.

Public Attributes

Format format = Format::Undefined
 Specifies the render-target attachment format. By default Format::Undefined.
Texture * texture = nullptr
 Pointer to the texture which is to be used as target output. By default null.
std::uint32_t mipLevel = 0
 Specifies the MIP-map level which is to be attached to a render target.
std::uint32_t arrayLayer = 0
 Specifies the array texture layer which is to be used as render target attachment.

Detailed Description

Render target attachment descriptor structure.

See also
RenderTargetDescriptor

Constructor & Destructor Documentation

◆ AttachmentDescriptor() [1/3]

LLGL::AttachmentDescriptor::AttachmentDescriptor ( )
default

◆ AttachmentDescriptor() [2/3]

LLGL::AttachmentDescriptor::AttachmentDescriptor ( Format format)
inline

Constructor for the specified depth-, or stencil attachment.

◆ AttachmentDescriptor() [3/3]

LLGL::AttachmentDescriptor::AttachmentDescriptor ( Texture * texture,
std::uint32_t mipLevel = 0,
std::uint32_t arrayLayer = 0 )
inline

Constructor for the specified depth-, stencil-, or color attachment.

Member Data Documentation

◆ arrayLayer

std::uint32_t LLGL::AttachmentDescriptor::arrayLayer = 0

Specifies the array texture layer which is to be used as render target attachment.

Remarks
This is only used for array textures and cube textures (i.e. TextureType::Texture1DArray, TextureType::Texture2DArray, TextureType::TextureCube, TextureType::TextureCubeArray, and TextureType::Texture2DMSArray).
For cube textures (i.e. TextureType::TextureCube and TextureType::TextureCubeArray), each cube has its own 6 array layers. The layer index for the respective cube faces is described at the TextureDescriptor::arrayLayers member.
If texture is null, this attribute is ignored.
See also
TextureDescriptor::arrayLayers

◆ format

Format LLGL::AttachmentDescriptor::format = Format::Undefined

Specifies the render-target attachment format. By default Format::Undefined.

Remarks
If this is undefined, texture must not be null and the format will be determined by the texture's format.
See also
Texture::GetFormat

◆ mipLevel

std::uint32_t LLGL::AttachmentDescriptor::mipLevel = 0

Specifies the MIP-map level which is to be attached to a render target.

Remarks
This is only used for non-multi-sample textures. All multi-sample textures will always use the first MIP-map level (i.e. TextureType::Texture2DMS and TextureType::Texture2DMSArray).
If texture is null, this attribute is ignored.

◆ texture

Texture* LLGL::AttachmentDescriptor::texture = nullptr

Pointer to the texture which is to be used as target output. By default null.

Remarks
If this is null, the attribute format must not be Format::Undefined. The texture must also have been created either with the binding flag BindFlags::ColorAttachment or BindFlags::DepthStencilAttachment.
See also
AttachmentDescriptor::type
TextureDescriptor::bindFlags

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