CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::UIFramebufferBackingStore Class Reference

Represents a UIBackingStore that renders its contents to an image texture. More...

#include <CeresEngine/UI/UIBackingStore.hpp>

Inheritance diagram for CeresEngine::UIFramebufferBackingStore:
CeresEngine::UIBackingStore CeresEngine::RefCounted< UIBackingStore >

Public Member Functions

 UIFramebufferBackingStore (GPUDevice &device)
 
 UIFramebufferBackingStore (GPUDevice &device, Format format)
 
 ~UIFramebufferBackingStore () noexcept override
 
Format getFormat () const
 The format of the backing store.
 
void setFormat (Format format)
 The format of the backing store.
 
Extent2UI getSize () const override
 The size of the backing store framebuffer.
 
void setSize (const Extent2UI &size) override
 The size of the backing store framebuffer.
 
bool isAntiAliasing () const noexcept override
 If set to true, enables anti-aliased rendering of the window.
 
void setAntiAliasing (bool antiAliasing) override
 If set to true, enables anti-aliased rendering of the window.
 
Optional< UInt32getSampleCount () const noexcept override
 If set, forces the use of the given sample count for UI rendering.
 
void setSampleCount (const Optional< UInt32 > &sampleCount) override
 If set, forces the use of the given sample count for UI rendering.
 
GPUImagegetColorImage () const
 The color render target image.
 
GPUImagegetDepthStencilImage () const
 The depth/stencil render target image.
 
GPURenderPassgetRenderPass () const
 The GPU render pass for rendering the UI.
 
GPURenderTargetgetRenderTarget () const
 The GPU render target.
 
void rebuild ()
 Invalidates the window render buffer.
 
void rebuildIfNeeded ()
 Invalidates the window render buffer.
 
void copyTo (GPUCommandBuffer &commandBuffer, GPUImage &destinationImage)
 Copies the color image contents into the given destination image.
 
- Public Member Functions inherited from CeresEngine::UIBackingStore
 UIBackingStore ()=default
 
virtual ~UIBackingStore () noexcept=default
 
- Public Member Functions inherited from CeresEngine::RefCounted< UIBackingStore >
 RefCounted (Args &&... args)
 Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Relases the object by decrementing it's reference count by one.
 

Private Types

using super = UIBackingStore
 

Private Attributes

Format mFormat = Format::RGBA8UNorm
 The format of the backing store.
 
Extent2UI mSize
 The size of the backing store framebuffer.
 
bool mAntiAliasing = true
 If set to true, enables anti-aliased rendering of the window.
 
Optional< UInt32mSampleCount
 If set, forces the use of the given sample count for UI rendering.
 
bool mDirty = true
 
GPUDevicePtr mDevice
 The GPU device that backs the framebuffer.
 
GPUImagePtr mColorImage
 The color render target image.
 
GPUImagePtr mDepthStencilImage
 The depth/stencil render target image.
 
GPURenderPassPtr mRenderPass
 The GPU render pass for rendering the UI.
 
GPURenderTargetPtr mRenderTarget
 The GPU render target.
 

Detailed Description

Represents a UIBackingStore that renders its contents to an image texture.

The UIFramebufferBackingStore class is a subclass of BackingStore and provides functionality to render the window contents to a color render target image. It also has support for a depth/stencil buffer for rendering bezier curves correctly.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ UIFramebufferBackingStore() [1/2]

CeresEngine::UIFramebufferBackingStore::UIFramebufferBackingStore ( GPUDevice device)
explicit

◆ UIFramebufferBackingStore() [2/2]

CeresEngine::UIFramebufferBackingStore::UIFramebufferBackingStore ( GPUDevice device,
Format  format 
)
explicit

◆ ~UIFramebufferBackingStore()

CeresEngine::UIFramebufferBackingStore::~UIFramebufferBackingStore ( )
overridenoexcept

Member Function Documentation

◆ copyTo()

void CeresEngine::UIFramebufferBackingStore::copyTo ( GPUCommandBuffer commandBuffer,
GPUImage destinationImage 
)

Copies the color image contents into the given destination image.

◆ getColorImage()

GPUImage & CeresEngine::UIFramebufferBackingStore::getColorImage ( ) const
inline

The color render target image.

The window contents will be rendered to this texture.

◆ getDepthStencilImage()

GPUImage & CeresEngine::UIFramebufferBackingStore::getDepthStencilImage ( ) const
inline

The depth/stencil render target image.

This will be used by the renderer to provide correct rendering of bezier curves. This texture is internally managed by the window and cannot be used or replaced externally.

◆ getFormat()

Format CeresEngine::UIFramebufferBackingStore::getFormat ( ) const
inline

The format of the backing store.

◆ getRenderPass()

GPURenderPass & CeresEngine::UIFramebufferBackingStore::getRenderPass ( ) const
inline

The GPU render pass for rendering the UI.

◆ getRenderTarget()

GPURenderTarget & CeresEngine::UIFramebufferBackingStore::getRenderTarget ( ) const
inline

The GPU render target.

Includes both the color and the depth/stencil image as a render target.

◆ getSampleCount()

Optional< UInt32 > CeresEngine::UIFramebufferBackingStore::getSampleCount ( ) const
inlineoverridevirtualnoexcept

If set, forces the use of the given sample count for UI rendering.

Implements CeresEngine::UIBackingStore.

◆ getSize()

Extent2UI CeresEngine::UIFramebufferBackingStore::getSize ( ) const
inlineoverridevirtual

The size of the backing store framebuffer.

Implements CeresEngine::UIBackingStore.

◆ isAntiAliasing()

bool CeresEngine::UIFramebufferBackingStore::isAntiAliasing ( ) const
inlineoverridevirtualnoexcept

If set to true, enables anti-aliased rendering of the window.

Implements CeresEngine::UIBackingStore.

◆ rebuild()

void CeresEngine::UIFramebufferBackingStore::rebuild ( )

Invalidates the window render buffer.

◆ rebuildIfNeeded()

void CeresEngine::UIFramebufferBackingStore::rebuildIfNeeded ( )

Invalidates the window render buffer.

◆ setAntiAliasing()

void CeresEngine::UIFramebufferBackingStore::setAntiAliasing ( bool  antiAliasing)
overridevirtual

If set to true, enables anti-aliased rendering of the window.

Implements CeresEngine::UIBackingStore.

◆ setFormat()

void CeresEngine::UIFramebufferBackingStore::setFormat ( Format  format)

The format of the backing store.

◆ setSampleCount()

void CeresEngine::UIFramebufferBackingStore::setSampleCount ( const Optional< UInt32 > &  sampleCount)
overridevirtual

If set, forces the use of the given sample count for UI rendering.

Implements CeresEngine::UIBackingStore.

◆ setSize()

void CeresEngine::UIFramebufferBackingStore::setSize ( const Extent2UI &  size)
overridevirtual

The size of the backing store framebuffer.

Implements CeresEngine::UIBackingStore.

Member Data Documentation

◆ mAntiAliasing

bool CeresEngine::UIFramebufferBackingStore::mAntiAliasing = true
private

If set to true, enables anti-aliased rendering of the window.

◆ mColorImage

GPUImagePtr CeresEngine::UIFramebufferBackingStore::mColorImage
mutableprivate

The color render target image.

The window contents will be rendered to this texture.

◆ mDepthStencilImage

GPUImagePtr CeresEngine::UIFramebufferBackingStore::mDepthStencilImage
mutableprivate

The depth/stencil render target image.

This will be used by the renderer to provide correct rendering of bezier curves. This texture is internally managed by the window and cannot be used or replaced externally.

◆ mDevice

GPUDevicePtr CeresEngine::UIFramebufferBackingStore::mDevice
private

The GPU device that backs the framebuffer.

◆ mDirty

bool CeresEngine::UIFramebufferBackingStore::mDirty = true
mutableprivate

◆ mFormat

Format CeresEngine::UIFramebufferBackingStore::mFormat = Format::RGBA8UNorm
private

The format of the backing store.

◆ mRenderPass

GPURenderPassPtr CeresEngine::UIFramebufferBackingStore::mRenderPass
mutableprivate

The GPU render pass for rendering the UI.

◆ mRenderTarget

GPURenderTargetPtr CeresEngine::UIFramebufferBackingStore::mRenderTarget
mutableprivate

The GPU render target.

Includes both the color and the depth/stencil image as a render target.

◆ mSampleCount

Optional<UInt32> CeresEngine::UIFramebufferBackingStore::mSampleCount
private

If set, forces the use of the given sample count for UI rendering.

◆ mSize

Extent2UI CeresEngine::UIFramebufferBackingStore::mSize
private

The size of the backing store framebuffer.


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