Kanzi 4.0.0-beta2
kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer Class Reference

Container for renderbuffer information. More...

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

Public Member Functions

GraphicsFormat getFormat () const
 Gets the desired format from the create info.
 
size_t getGPUMemoryUsage () const
 Gets the GPU memory usage for the renderbuffer.
 
size_t getHeight () const
 Gets the desired height from the create info.
 
RenderbufferSharedPtr getRenderbuffer () const
 Gets a strong reference to the contained renderbuffer.
 
RenderbuffergetRenderbufferPointer () const
 Gets the contained renderbuffer.
 
size_t getSampleCount () const
 Gets the desired sample count from the create info.
 
size_t getWidth () const
 Gets the desired width from the create info.
 
bool isDirty () const
 Indicates whether or not the container is dirty and renderbuffer recreation is required.
 
bool isTransient () const
 Gets the transient flag.
 
bool matches (const Renderbuffer::CreateInfo &createInfo) const
 Indicates whether the contained create information matches given create information.
 
RenderbufferContaineroperator= (const RenderbufferContainer &)=delete
 
RenderbufferContaineroperator= (RenderbufferContainer &&other) noexcept
 Move operator.
 
 RenderbufferContainer ()=default
 Default constructor.
 
 RenderbufferContainer (const Renderbuffer::CreateInfo &createInfo, string_view name)
 Constructor.
 
 RenderbufferContainer (const RenderbufferContainer &)=delete
 
 RenderbufferContainer (RenderbufferContainer &&other) noexcept
 Move constructor.
 
bool setCreateInfo (const Renderbuffer::CreateInfo &createInfo, string_view name)
 Sets the create information.
 
bool update (Renderer &renderer)
 Update the renderbuffer.
 

Protected Attributes

Renderbuffer::CreateInfo m_createInfo
 Create information for the renderbuffer.
 
bool m_dirty
 Flag for indicating the renderbuffer create information has changed and an update is needed.
 
string m_name
 Name for the owned renderbuffer when it's created.
 
RenderbufferSharedPtr m_renderbuffer
 Owned renderbuffer.
 

Detailed Description

Container for renderbuffer information.

Used for storing the create information for later creation of the renderbuffer.

Since
Kanzi 4.0.0

Constructor & Destructor Documentation

◆ RenderbufferContainer() [1/4]

kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::RenderbufferContainer ( )
explicitdefault

Default constructor.

◆ RenderbufferContainer() [2/4]

kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::RenderbufferContainer ( const Renderbuffer::CreateInfo & createInfo,
string_view name )
inlineexplicit

Constructor.

Parameters
createInfoCreate info structure to use for constructing the renderbuffer later.
nameName of the renderbuffer.

◆ RenderbufferContainer() [3/4]

kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::RenderbufferContainer ( RenderbufferContainer && other)
inlinenoexcept

Move constructor.

Parameters
otherSource container.

◆ RenderbufferContainer() [4/4]

kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::RenderbufferContainer ( const RenderbufferContainer & )
delete

Member Function Documentation

◆ operator=() [1/2]

RenderbufferContainer & kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::operator= ( RenderbufferContainer && other)
inlinenoexcept

Move operator.

Parameters
otherSource container.
Returns
This container object.

◆ operator=() [2/2]

RenderbufferContainer & kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::operator= ( const RenderbufferContainer & )
delete

◆ matches()

bool kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::matches ( const Renderbuffer::CreateInfo & createInfo) const

Indicates whether the contained create information matches given create information.

Parameters
createInfoCreate info structure to check.
Returns
If the structures are matching true, false otherwise.

◆ setCreateInfo()

bool kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::setCreateInfo ( const Renderbuffer::CreateInfo & createInfo,
string_view name )

Sets the create information.

This function automatically updates the dirty flag if the structures are not matching.

Parameters
createInfoCreate info structure to set.
nameName of the renderbuffer.
Returns
If the create info structure was updated and is dirty true, false otherwise.

◆ update()

bool kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::update ( Renderer & renderer)

Update the renderbuffer.

Creates the renderbuffer if it's missing or not matching with the contained CreateInfo structure.

Returns
If the contained renderbuffer was updated in any way true, false otherwise.

◆ getRenderbuffer()

RenderbufferSharedPtr kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::getRenderbuffer ( ) const
inline

Gets a strong reference to the contained renderbuffer.

Returns
Strong reference to the renderbuffer owned by the container.

◆ getRenderbufferPointer()

Renderbuffer * kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::getRenderbufferPointer ( ) const
inline

Gets the contained renderbuffer.

Returns
Renderbuffer owned by the container.

◆ getSampleCount()

size_t kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::getSampleCount ( ) const
inline

Gets the desired sample count from the create info.

Returns
Sample count.

◆ getFormat()

GraphicsFormat kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::getFormat ( ) const
inline

Gets the desired format from the create info.

Returns
Format.

◆ getWidth()

size_t kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::getWidth ( ) const
inline

Gets the desired width from the create info.

Returns
Attachment width.

◆ getHeight()

size_t kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::getHeight ( ) const
inline

Gets the desired height from the create info.

Returns
Attachment height.

◆ isTransient()

bool kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::isTransient ( ) const
inline

Gets the transient flag.

Returns
Transient flag.

◆ getGPUMemoryUsage()

size_t kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::getGPUMemoryUsage ( ) const
inline

Gets the GPU memory usage for the renderbuffer.

If the renderbuffer has not been allocated, returns 0 bytes. If the container is dirty and has not been updated, returns GPU memory usage of the current renderbuffer.

Returns
GPU memory usage in bytes.

◆ isDirty()

bool kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::isDirty ( ) const
inline

Indicates whether or not the container is dirty and renderbuffer recreation is required.

Returns
If recreation is needed true, false otherwise.

Member Data Documentation

◆ m_createInfo

Renderbuffer::CreateInfo kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::m_createInfo
protected

Create information for the renderbuffer.

◆ m_name

string kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::m_name
protected

Name for the owned renderbuffer when it's created.

◆ m_renderbuffer

RenderbufferSharedPtr kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::m_renderbuffer
protected

Owned renderbuffer.

◆ m_dirty

bool kanzi::Framebuffer::AttachmentPoint::RenderbufferContainer::m_dirty
protected

Flag for indicating the renderbuffer create information has changed and an update is needed.


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