1.14.0.5
Hummingbird
A modern user interface library for games
cohtml::SystemRenderer Class Referenceabstract

The SystemRenderer lives on the render thread and holds all resources shared between mutliple Views belonging to the same System (font atlases, texture caches etc.) More...

Public Member Functions

virtual ViewRendererCreateViewRenderer (View *owner, const ViewRendererSettings &settings)=0
 Creates a new ViewRenderer used to draw a single View. More...
 
virtual void Destroy ()=0
 Destroys the SystemRenderer freeing all resources associated with it. More...
 
virtual void RegisterRenderThread (renoir::RendererBackend *backend)=0
 Registers the SystemRenderer with a render thread and sets the rendering backend. More...
 
virtual void FreeRenderingResources ()=0
 Frees all rendering resources used by Hummingbird that are shared in the System. More...
 

Detailed Description

The SystemRenderer lives on the render thread and holds all resources shared between mutliple Views belonging to the same System (font atlases, texture caches etc.)

Member Function Documentation

◆ CreateViewRenderer()

virtual ViewRenderer* cohtml::SystemRenderer::CreateViewRenderer ( View owner,
const ViewRendererSettings &  settings 
)
pure virtual

Creates a new ViewRenderer used to draw a single View.

Parameters
ownerthe view that will be rendered by the new ViewRenderer
settingssettings of the new ViewRenderer
Returns
the new ViewRenderer instance
Note
Can be called on the main thread

◆ Destroy()

virtual void cohtml::SystemRenderer::Destroy ( )
pure virtual

Destroys the SystemRenderer freeing all resources associated with it.

Note
All ViewRenderers created from this should be destoryed before

◆ FreeRenderingResources()

virtual void cohtml::SystemRenderer::FreeRenderingResources ( )
pure virtual

Frees all rendering resources used by Hummingbird that are shared in the System.

Note
system-wide shared rendering resources include textures, shaders, font glyphs, texture sampler objects, pipeline states. path buffers. Constant/vertex/index buffers are managed on a per-view basis and can be freed with cohtml::ViewRenderer::FreeRenderingResources
See also
cohtml::ViewRenderer::FreeRenderingResources

◆ RegisterRenderThread()

virtual void cohtml::SystemRenderer::RegisterRenderThread ( renoir::RendererBackend *  backend)
pure virtual

Registers the SystemRenderer with a render thread and sets the rendering backend.

Parameters
backendBackend to be used in the render thread
Note
You must call this on the render thread.