Kanzi 4.0.0-beta2
kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel Class Reference

Mipmap framebuffer level. More...

#include <kanzi/core.ui/graphics3d/mipmap_generation_concept_impl.hpp>

Public Member Functions

void configure (Renderer &renderer, Surface::APIAttachment attachment, const TextureSharedPtr &texture, size_t mipmapLevel, size_t width, size_t height)
 Configures for rendering into given mipmap level.
 
TextureSharedPtr getColorTexture (size_t faceIndex) const
 Gets the first color texture attachment, if available.
 
TextureSharedPtr getDepthTexture (size_t faceIndex) const
 Gets the depth texture attachment, if available.
 
FramebuffergetFramebuffer (size_t faceIndex) const
 Gets the framebuffer from this level.
 
size_t getHeight () const
 Gets the height at this framebuffer level.
 
size_t getWidth () const
 Gets the width at this framebuffer level.
 
 MipmapFramebufferLevel ()=default
 Default constructor.
 
 MipmapFramebufferLevel (const MipmapFramebufferLevel &)=delete
 Deleted copy constructor.
 
 MipmapFramebufferLevel (MipmapFramebufferLevel &&other)
 Move constructor.
 
 MipmapFramebufferLevel (Renderer &renderer, Surface::APIAttachment attachment, const TextureSharedPtr &texture, size_t mipmapLevel, size_t width, size_t height, string_view name)
 Constructor.
 
MipmapFramebufferLeveloperator= (const MipmapFramebufferLevel &)=delete
 Deleted copy operator.
 
MipmapFramebufferLeveloperator= (MipmapFramebufferLevel &&other)
 Move operator.
 

Protected Attributes

array< FramebufferPtr, FaceCountm_framebuffers
 Framebuffer pointers.
 
size_t m_height
 Rendering height at bound level.
 
size_t m_width
 Rendering width at bound level.
 

Detailed Description

template<typename TBaseClass, typename TDerivedClass, size_t FaceCount>
class kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel

Mipmap framebuffer level.

Contains a framebuffer targeting a texture and an associated rendering size.

Constructor & Destructor Documentation

◆ MipmapFramebufferLevel() [1/4]

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::MipmapFramebufferLevel ( )
explicitdefault

Default constructor.

◆ MipmapFramebufferLevel() [2/4]

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::MipmapFramebufferLevel ( Renderer & renderer,
Surface::APIAttachment attachment,
const TextureSharedPtr & texture,
size_t mipmapLevel,
size_t width,
size_t height,
string_view name )
inlineexplicit

Constructor.

Parameters
rendererRenderer to use.
attachmentAPI attachment for given texture within the framebuffer.
textureTexture being rendered to.
mipmapLevelTarget mipmap level.
widthCurrent mipmap level width.
heightCurrent mipmap level height.
nameFramebuffer base name.

◆ MipmapFramebufferLevel() [3/4]

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::MipmapFramebufferLevel ( MipmapFramebufferLevel && other)
inline

Move constructor.

Parameters
otherSource object.

◆ MipmapFramebufferLevel() [4/4]

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::MipmapFramebufferLevel ( const MipmapFramebufferLevel & )
delete

Deleted copy constructor.

Member Function Documentation

◆ operator=() [1/2]

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MipmapFramebufferLevel & kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::operator= ( MipmapFramebufferLevel && other)
inline

Move operator.

Parameters
otherSource object.
Returns
This object.

◆ operator=() [2/2]

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
MipmapFramebufferLevel & kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::operator= ( const MipmapFramebufferLevel & )
delete

Deleted copy operator.

◆ configure()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
void kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::configure ( Renderer & renderer,
Surface::APIAttachment attachment,
const TextureSharedPtr & texture,
size_t mipmapLevel,
size_t width,
size_t height )

Configures for rendering into given mipmap level.

Parameters
rendererRenderer to use.
attachmentAPI attachment for given texture within the framebuffer.
textureTexture being rendered to.
mipmapLevelTarget mipmap level.
widthCurrent mipmap level width.
heightCurrent mipmap level height.

◆ getColorTexture()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
TextureSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::getColorTexture ( size_t faceIndex) const
inline

Gets the first color texture attachment, if available.

Parameters
faceIndexFace index.
Returns
Color texture attached or nullptr.

◆ getDepthTexture()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
TextureSharedPtr kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::getDepthTexture ( size_t faceIndex) const
inline

Gets the depth texture attachment, if available.

Parameters
faceIndexFace index.
Returns
Depth texture attached or nullptr.

◆ getFramebuffer()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
Framebuffer * kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::getFramebuffer ( size_t faceIndex) const
inline

Gets the framebuffer from this level.

Parameters
faceIndexFace index.
Returns
Pointer to framebuffer or nullptr.

◆ getWidth()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
size_t kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::getWidth ( ) const
inline

Gets the width at this framebuffer level.

Returns
Width at this level.

◆ getHeight()

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
size_t kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::getHeight ( ) const
inline

Gets the height at this framebuffer level.

Returns
Height at this level.

Member Data Documentation

◆ m_framebuffers

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
array<FramebufferPtr, FaceCount> kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::m_framebuffers
protected

Framebuffer pointers.

For 2D textures, only the first element is non-null. Cubemap textures use all faces.

◆ m_width

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
size_t kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::m_width
protected

Rendering width at bound level.

◆ m_height

template<typename TBaseClass , typename TDerivedClass , size_t FaceCount>
size_t kanzi::MipmapGenerationConceptImpl< TBaseClass, TDerivedClass, FaceCount >::MipmapFramebufferLevel::m_height
protected

Rendering height at bound level.


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