renoir::IRenderingLibrary
On this page
This class encapsulates the global Rendering library.
#include <CoherentRenderingLibrary.h>
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 | 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
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
virtual void InitializeOnRenderThread(
RendererBackend * backend
) =0
Registers 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
virtual void DestroyRenderingResources() =0
Frees all rendering resources used by the Rendering Library that are shared in the Library.
function ClearResourceCache
virtual void ClearResourceCache(
size_t targetSize =0
) =0
Frees 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
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.
function Uninitialize
virtual void Uninitialize() =0
Destroys the renderer.
function GetVersion
virtual const char * GetVersion() const =0
Gets the version of the Rendering Library.
function GetResourceCacheUsage
virtual size_t GetResourceCacheUsage() const =0
Gets the bytes used of the internal GPU resource cache.
Note: You must call this on the render thread.
function GetResourceCacheCapacity
virtual size_t GetResourceCacheCapacity() const =0
Gets the capacity of the internal GPU resource cache in bytes.
Note: You must call this on the render thread.
function SetResourceCacheCapacity
virtual void SetResourceCacheCapacity(
size_t capacity
) =0
Sets byte capacity of the internal GPU resource cache in bytes.
Note: You must call this on the render thread.
function GetCommandBufferPoolBytesStats
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.
function SetCommandBufferPoolBytesCapacity
virtual void SetCommandBufferPoolBytesCapacity(
unsigned capacity
) =0
Sets 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
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.
function SetCommandBufferPoolCountCapacity
virtual void SetCommandBufferPoolCountCapacity(
unsigned capacity
) =0
Sets 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
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.
function SetCommandProcessorPoolBytesCapacity
virtual void SetCommandProcessorPoolBytesCapacity(
unsigned capacity
) =0
Sets 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
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.
function SetCommandProcessorPoolCountCapacity
virtual void SetCommandProcessorPoolCountCapacity(
unsigned capacity
) =0
Sets 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
virtual void ClearCommandBufferPoolFreeList() =0
Clears 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
virtual void ClearCommandProcessorPoolFreeList() =0
Clears 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
virtual void ClearTextAtlases() =0
Clears the internal fonts textures cache.
Note: You must call this on the render thread.
function ClearTextAtlasesImmediate
virtual void ClearTextAtlasesImmediate() =0
function ReservedMethod
virtual void * ReservedMethod(
void * command,
void * data
) =0
Reserved method for internal usage. Do not use.
function StartTrace
virtual void StartTrace() =0
Starts a trace and causes Renoir to start sending trace events through the tracer.
function EndTrace
virtual void EndTrace() =0
Stops the active trace and causes Renoir to stop sending trace events through the tracer.
function ~IRenderingLibrary
virtual ~IRenderingLibrary()