cohtml::SystemRenderer

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

#include <SystemRenderer.h>

Public Functions

Name
virtual~SystemRenderer()
virtual ViewRenderer *CreateViewRenderer(View * owner, const ViewRendererSettings & settings) =0
Creates a new ViewRenderer used to draw a single View.
virtual voidDestroy() =0
Destroys the SystemRenderer freeing all resources associated with it.
virtual voidRegisterRenderThread(renoir::RendererBackend * backend) =0
Registers the SystemRenderer with a render thread and sets the rendering backend.
virtual voidFreeRenderingResources() =0
Frees all rendering resources used by Cohtml that are shared in the System.

Public Functions Documentation

function ~SystemRenderer

virtual ~SystemRenderer()

function CreateViewRenderer

virtual ViewRenderer * CreateViewRenderer(
    View * owner,
    const ViewRendererSettings & settings
) =0

Creates a new ViewRenderer used to draw a single View.

Parameters:

Return: the new ViewRenderer instance

Note: Can be called on the main thread

function Destroy

virtual void Destroy() =0

Destroys the SystemRenderer freeing all resources associated with it.

Note: All ViewRenderers created from this should be destroyed before

function RegisterRenderThread

virtual void RegisterRenderThread(
    renoir::RendererBackend * backend
) =0

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

Parameters:

  • backend Backend to be used in the render thread

Note: You must call this on the render thread.

function FreeRenderingResources

virtual void FreeRenderingResources() =0

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

See: cohtml::ViewRenderer::FreeRenderingResources

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