Kanzi  3.9.6
Kanzi Engine API
kanzi::CompositionManager::Target Class Reference

Composition target. More...

#include <kanzi/core.ui/graphics2d/composition_manager.hpp>

Public Member Functions

void generateMipmaps ()
 Generate mipmaps for all textures in the composition target. More...
 
Sampler::AddressingMode getAddressingMode () const
 Gets the addressing mode of the composition target. More...
 
TextureSharedPtr getAttachmentPointTexture (FramebufferAttachmentPoint attachmentPoint) const
 Gets the texture corresponding to a given attachment point. More...
 
GraphicsFormat getColorFormat () const
 Gets the color format. More...
 
RenderbufferSharedPtr getColorRenderbuffer () const
 Gets the color renderbuffer. More...
 
TextureSharedPtr getCompositionTexture () const
 Gets the texture used for composition. More...
 
GraphicsFormat getDepthStencilFormat () const
 Gets the depth and/or stencil format. More...
 
RenderbufferSharedPtr getDepthStencilRenderbuffer () const
 Gets the depth/stencil renderbuffer. More...
 
TextureSharedPtr getDepthTexture () const
 Gets the depth texture. More...
 
Sampler::Filter getFilterMode () const
 Gets the filter mode of the composition target. More...
 
unsigned int getHeight () const
 Gets the height of the texture that has the framebuffer. More...
 
Sampler::MipmapMode getMipmapMode () const
 Gets the mipmap mode of the composition target. More...
 
tuple< TextureSharedPtr, bool, bool > getResolveSettings () const
 Get the information for resolve target. More...
 
unsigned int getSampleCount () const
 Gets the sample count for the composition target. More...
 
TextureSharedPtr getTexture () const
 Gets the main texture. More...
 
unsigned int getWidth () const
 Gets the width of the texture that has the framebuffer. More...
 
 operator bool_type () const
 
void reset ()
 Clear all memory used by the composition target. More...
 
void setColorTexture (TextureSharedPtr colorTexture)
 Sets the color texture. More...
 
void setDepthTexture (TextureSharedPtr depthTexture)
 Sets the depth texture. More...
 
 Target ()
 Empty constructor. More...
 
 Target (TextureSharedPtr texture)
 Constructor. More...
 
 Target (TextureSharedPtr texture, RenderbufferSharedPtr colorRenderBuffer, TextureSharedPtr depthTexture)
 Constructor. More...
 

Detailed Description

Composition target.

Collection of different elements managed by the composition manager.

Constructor & Destructor Documentation

◆ Target() [1/3]

kanzi::CompositionManager::Target::Target ( )
inlineexplicit

Empty constructor.

Target created in this way is not valid.

◆ Target() [2/3]

kanzi::CompositionManager::Target::Target ( TextureSharedPtr  texture)
inlineexplicit

Constructor.

Only texture is defined.

◆ Target() [3/3]

kanzi::CompositionManager::Target::Target ( TextureSharedPtr  texture,
RenderbufferSharedPtr  colorRenderBuffer,
TextureSharedPtr  depthTexture 
)
inlineexplicit

Constructor.

Specify all components and reattach framebuffers.

Parameters
textureMain texture.
colorRenderBufferColor render buffer.
depthTextureDepth texture.

Member Function Documentation

◆ getTexture()

TextureSharedPtr kanzi::CompositionManager::Target::getTexture ( ) const
inline

Gets the main texture.

Main texture may exist even if its graphics format is GraphicsFormatNone.

Returns
Shared pointer to color texture or nullptr if color texture is not set.

◆ setColorTexture()

void kanzi::CompositionManager::Target::setColorTexture ( TextureSharedPtr  colorTexture)
inline

Sets the color texture.

Kanzi uses this function internally. You do not need to manually modify the composition targets.

Parameters
colorTextureColor texture to set.

◆ getColorRenderbuffer()

RenderbufferSharedPtr kanzi::CompositionManager::Target::getColorRenderbuffer ( ) const
inline

Gets the color renderbuffer.

Returns
Shared pointer to renderbuffer. May be empty.

◆ getDepthStencilRenderbuffer()

RenderbufferSharedPtr kanzi::CompositionManager::Target::getDepthStencilRenderbuffer ( ) const
inline

Gets the depth/stencil renderbuffer.

Returns
Shared pointer to depth/stencil renderbuffer or nullptr.

◆ getDepthTexture()

TextureSharedPtr kanzi::CompositionManager::Target::getDepthTexture ( ) const
inline

Gets the depth texture.

Returns
Shared pointer to depth texture or nullptr if depth texture is not set.

◆ setDepthTexture()

void kanzi::CompositionManager::Target::setDepthTexture ( TextureSharedPtr  depthTexture)
inline

Sets the depth texture.

Kanzi uses this function internally. You do not need to manually modify the composition targets.

Parameters
depthTextureDepth texture to set.

◆ getWidth()

unsigned int kanzi::CompositionManager::Target::getWidth ( ) const
inline

Gets the width of the texture that has the framebuffer.

Returns
Composition target width.

◆ getHeight()

unsigned int kanzi::CompositionManager::Target::getHeight ( ) const
inline

Gets the height of the texture that has the framebuffer.

Returns
Composition target height.

◆ getSampleCount()

unsigned int kanzi::CompositionManager::Target::getSampleCount ( ) const
inline

Gets the sample count for the composition target.

This is either the sample count for the texture with the framebuffer or for the color render buffer.

Returns
Sample count as unsigned integer. Values <= 1 mean multisampling is disabled.

◆ getAddressingMode()

Sampler::AddressingMode kanzi::CompositionManager::Target::getAddressingMode ( ) const
inline

Gets the addressing mode of the composition target.

All textures in the composition target have the same sampling mode.

Returns
Addressing mode.

◆ getFilterMode()

Sampler::Filter kanzi::CompositionManager::Target::getFilterMode ( ) const
inline

Gets the filter mode of the composition target.

All textures in the composition target have the same filter mode.

Returns
Filter mode.

◆ getMipmapMode()

Sampler::MipmapMode kanzi::CompositionManager::Target::getMipmapMode ( ) const
inline

Gets the mipmap mode of the composition target.

All textures in the composition target have the same mipmap mode.

Returns
Mipmap mode.

◆ getColorFormat()

GraphicsFormat kanzi::CompositionManager::Target::getColorFormat ( ) const
inline

Gets the color format.

This is either the color format of the color render buffer, or that of the texture.

Returns
Graphics format. May be GraphicsFormatNone if only depth texture has meaning.

◆ getDepthStencilFormat()

GraphicsFormat kanzi::CompositionManager::Target::getDepthStencilFormat ( ) const
inline

Gets the depth and/or stencil format.

Depth and/or stencil format is combined from the format of the texture and potentially of the depth texture.

Returns
Graphics format.

◆ getCompositionTexture()

TextureSharedPtr kanzi::CompositionManager::Target::getCompositionTexture ( ) const
inline

Gets the texture used for composition.

Returns
Shared pointer to texture.

◆ getResolveSettings()

tuple<TextureSharedPtr, bool, bool> kanzi::CompositionManager::Target::getResolveSettings ( ) const
inline

Get the information for resolve target.

Returns
Triplet of resolve framebuffer and boolean flags for whether color and depth are resolved.

◆ getAttachmentPointTexture()

TextureSharedPtr kanzi::CompositionManager::Target::getAttachmentPointTexture ( FramebufferAttachmentPoint  attachmentPoint) const
inline

Gets the texture corresponding to a given attachment point.

Parameters
attachmentPointAttachment point to get.
Returns
Shared pointer to texture or an empty shared pointer if no corresponding attachment point.

◆ generateMipmaps()

void kanzi::CompositionManager::Target::generateMipmaps ( )
inline

Generate mipmaps for all textures in the composition target.

◆ reset()

void kanzi::CompositionManager::Target::reset ( )
inline

Clear all memory used by the composition target.

◆ operator bool_type()

kanzi::CompositionManager::Target::operator bool_type ( ) const
inline

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