renoir::IRenderingLibrary
This class encapsulates the global Rendering library.
#include <CoherentRenderingLibrary.h>
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| RENOIR_API IRenderingLibrary * | Initialize(const RenderingLibraryParams & params) Initializes the library. |
| virtual void | InitializeOnRenderThread(RendererBackend * backend) =0 Registers the Rendering Library with a render thread and sets the rendering backend. |
| virtual void | DestroyRenderingResources() =0 Frees all rendering resources used by the Rendering Library that are shared in the Library. |
| virtual void | ClearResourceCache(size_t targetSize =0) =0 Frees all unused rendering resources in the internal resource pool. |
| virtual void | UnloadFonts(unsigned * ids, size_t size) =0 Sets the font with the given typeface ID to be unloaded when it’s no longer needed by any views. |
| virtual void | Uninitialize() =0 Destroys the renderer. |
| virtual const char * | GetVersion() const =0 Gets the version of the Rendering Library. |
| virtual size_t | GetResourceCacheUsage() const =0 Gets the bytes used of the internal GPU resource cache. |
| virtual size_t | GetResourceCacheCapacity() const =0 Gets the capacity of the internal GPU resource cache in bytes. |
| virtual void | SetResourceCacheCapacity(size_t capacity) =0 Sets byte capacity of the internal GPU resource cache in bytes. |
| virtual void | SetResourceCacheMaxRTs(size_t capacity) =0 Sets the max count of the render target textures to be kept alive while unused. |
| virtual void | SetResourceCacheMaxDSs(size_t capacity) =0 Sets the max count of the depth stencil textures to be kept alive while unused. |
| virtual void | GetCommandBufferPoolBytesStats(unsigned & allocated, unsigned & capacity) const =0 Gets info about the amount of bytes allocated and the maximum capacity for objects in the internal command processor pool. |
| virtual void | SetCommandBufferPoolBytesCapacity(unsigned capacity) =0 Sets the maximum capacity in bytes for unused instances in the internal command processor pool. |
| virtual void | GetCommandBufferPoolCountStats(unsigned & count, unsigned & capacity) const =0 Gets info about the allocated count and the maximum capacity for objects in the internal command processor pool. |
| virtual void | SetCommandBufferPoolCountCapacity(unsigned capacity) =0 Sets the maximum amount of unused instances in the internal command processor pool. |
| virtual void | GetCommandProcessorPoolBytesStats(unsigned & allocated, unsigned & capacity) const =0 Gets info about the amount of bytes allocated and the maximum capacity for objects in the internal command buffer pool. |
| virtual void | SetCommandProcessorPoolBytesCapacity(unsigned capacity) =0 Sets the maximum capacity in bytes for unused instances in the internal command buffer pool. |
| virtual void | GetCommandProcessorPoolCountStats(unsigned & count, unsigned & capacity) const =0 Gets info about the allocated count and the maximum capacity for objects in the internal command buffer pool. |
| virtual void | SetCommandProcessorPoolCountCapacity(unsigned capacity) =0 Sets the maximum amount of unused instances in the internal command buffer pool. |
| virtual void | ClearCommandBufferPoolFreeList() =0 Clears the internal command buffers pool cache. |
| virtual void | ClearCommandProcessorPoolFreeList() =0 Clears the internal command processors pool cache. |
| virtual void | ClearTextAtlases() =0 Clears the internal fonts textures cache. |
| virtual void | ClearTextAtlasesImmediate() =0 |
| virtual void * | ReservedMethod(void * command, void * data) =0 Reserved method for internal usage. Do not use. |
| virtual void | StartTrace() =0 Starts a trace and causes Renoir to start sending trace events through the tracer. |
| virtual void | EndTrace() =0 Stops the active trace and causes Renoir to stop sending trace events through the tracer. |
| virtual | ~IRenderingLibrary() |
Public Functions Documentation
Section titled “Public Functions Documentation”function Initialize
Section titled “function Initialize”static RENOIR_API IRenderingLibrary * Initialize( const RenderingLibraryParams & params)Initializes the library.
Parameters:
- params the initialization parameters of the library.
Return: A library object
Note: you can have only one library active at a time
function InitializeOnRenderThread
Section titled “function InitializeOnRenderThread”virtual void InitializeOnRenderThread( RendererBackend * backend) =0Registers the Rendering Library 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 DestroyRenderingResources
Section titled “function DestroyRenderingResources”virtual void DestroyRenderingResources() =0Frees all rendering resources used by the Rendering Library that are shared in the Library.
function ClearResourceCache
Section titled “function ClearResourceCache”virtual void ClearResourceCache( size_t targetSize =0) =0Frees all unused rendering resources in the internal resource pool.
Parameters:
- targetSize the target size of the cached resources in bytes. Clearing will stop once cache size is lower or equal to targetSize
function UnloadFonts
Section titled “function UnloadFonts”virtual void UnloadFonts( unsigned * ids, size_t size) =0Sets the font with the given typeface ID to be unloaded when it’s no longer needed by any views.
function Uninitialize
Section titled “function Uninitialize”virtual void Uninitialize() =0Destroys the renderer.
function GetVersion
Section titled “function GetVersion”virtual const char * GetVersion() const =0Gets the version of the Rendering Library.
function GetResourceCacheUsage
Section titled “function GetResourceCacheUsage”virtual size_t GetResourceCacheUsage() const =0Gets the bytes used of the internal GPU resource cache.
Note: You must call this on the render thread.
function GetResourceCacheCapacity
Section titled “function GetResourceCacheCapacity”virtual size_t GetResourceCacheCapacity() const =0Gets the capacity of the internal GPU resource cache in bytes.
Note: You must call this on the render thread.
function SetResourceCacheCapacity
Section titled “function SetResourceCacheCapacity”virtual void SetResourceCacheCapacity( size_t capacity) =0Sets byte capacity of the internal GPU resource cache in bytes.
Note: You must call this on the render thread.
function SetResourceCacheMaxRTs
Section titled “function SetResourceCacheMaxRTs”virtual void SetResourceCacheMaxRTs( size_t capacity) =0Sets the max count of the render target textures to be kept alive while unused.
Note: You must call this on the render thread.
function SetResourceCacheMaxDSs
Section titled “function SetResourceCacheMaxDSs”virtual void SetResourceCacheMaxDSs( size_t capacity) =0Sets the max count of the depth stencil textures to be kept alive while unused.
Note: You must call this on the render thread.
function GetCommandBufferPoolBytesStats
Section titled “function GetCommandBufferPoolBytesStats”virtual void GetCommandBufferPoolBytesStats( unsigned & allocated, unsigned & capacity) const =0Gets info about the amount of bytes allocated and the maximum capacity for objects in the internal command processor pool.
function SetCommandBufferPoolBytesCapacity
Section titled “function SetCommandBufferPoolBytesCapacity”virtual void SetCommandBufferPoolBytesCapacity( unsigned capacity) =0Sets the maximum capacity in bytes for unused instances in the internal command processor pool.
Note:
- If you set this to 0, this will effectively disable pooling
- Disabling pooling at runtime may require an additional frame to pass in order to return all used instances to the unused list, which will then be freed
function GetCommandBufferPoolCountStats
Section titled “function GetCommandBufferPoolCountStats”virtual void GetCommandBufferPoolCountStats( unsigned & count, unsigned & capacity) const =0Gets info about the allocated count and the maximum capacity for objects in the internal command processor pool.
function SetCommandBufferPoolCountCapacity
Section titled “function SetCommandBufferPoolCountCapacity”virtual void SetCommandBufferPoolCountCapacity( unsigned capacity) =0Sets the maximum amount of unused instances in the internal command processor pool.
Note:
- If you set this to 0, this will effectively disable pooling
- Disabling pooling at runtime may require an additional frame to pass in order to return all used instances to the unused list, which will then be freed
function GetCommandProcessorPoolBytesStats
Section titled “function GetCommandProcessorPoolBytesStats”virtual void GetCommandProcessorPoolBytesStats( unsigned & allocated, unsigned & capacity) const =0Gets info about the amount of bytes allocated and the maximum capacity for objects in the internal command buffer pool.
function SetCommandProcessorPoolBytesCapacity
Section titled “function SetCommandProcessorPoolBytesCapacity”virtual void SetCommandProcessorPoolBytesCapacity( unsigned capacity) =0Sets the maximum capacity in bytes for unused instances in the internal command buffer pool.
Note:
- If you set this to 0, this will effectively disable pooling
- Disabling pooling at runtime may require an additional frame to pass in order to return all used instances to the unused list, which will then be freed
function GetCommandProcessorPoolCountStats
Section titled “function GetCommandProcessorPoolCountStats”virtual void GetCommandProcessorPoolCountStats( unsigned & count, unsigned & capacity) const =0Gets info about the allocated count and the maximum capacity for objects in the internal command buffer pool.
function SetCommandProcessorPoolCountCapacity
Section titled “function SetCommandProcessorPoolCountCapacity”virtual void SetCommandProcessorPoolCountCapacity( unsigned capacity) =0Sets the maximum amount of unused instances in the internal command buffer pool.
Note:
- If you set this to 0, this will effectively disable pooling
- Disabling pooling at runtime may require an additional frame to pass in order to return all used instances to the unused list, which will then be freed
function ClearCommandBufferPoolFreeList
Section titled “function ClearCommandBufferPoolFreeList”virtual void ClearCommandBufferPoolFreeList() =0Clears the internal command buffers pool cache.
Note:
- The memory is used for serializing commands that will be passed to the command processor.
- Only clears objects that are not currently in use
function ClearCommandProcessorPoolFreeList
Section titled “function ClearCommandProcessorPoolFreeList”virtual void ClearCommandProcessorPoolFreeList() =0Clears the internal command processors pool cache.
Note:
- The memory is used to adjust and serialize commands that will be passed to the client’s backend.
- Only clears objects that are not currently in use
function ClearTextAtlases
Section titled “function ClearTextAtlases”virtual void ClearTextAtlases() =0Clears the internal fonts textures cache.
Note: You must call this on the render thread.
function ClearTextAtlasesImmediate
Section titled “function ClearTextAtlasesImmediate”virtual void ClearTextAtlasesImmediate() =0function ReservedMethod
Section titled “function ReservedMethod”virtual void * ReservedMethod( void * command, void * data) =0Reserved method for internal usage. Do not use.
function StartTrace
Section titled “function StartTrace”virtual void StartTrace() =0Starts a trace and causes Renoir to start sending trace events through the tracer.
function EndTrace
Section titled “function EndTrace”virtual void EndTrace() =0Stops the active trace and causes Renoir to stop sending trace events through the tracer.
function ~IRenderingLibrary
Section titled “function ~IRenderingLibrary”virtual ~IRenderingLibrary()© 2026 Coherent Labs. All rights reserved.