ResourceCache

Description

sealed class Tinman.Engine.Rendering.ResourceCache

A cache for graphics resource objects, with an optional maximum GPU memory limit for resource objects that implement the IMemoryConsumption interface.

The estimated GPU memory consumption of resource objects obtained via IResourceCache.GetNull counts towards the memory limit. Resource objects obtained via IResourceCache.OwnNull do not count towards the memory limit.

Public / Constructors

Resource​Cache


public constructor ResourceCache → (1)

graphics in : Graphics

[not-null]
The graphics object to use.

Creates a new instance of ResourceCache.

The initial cache size (see CacheMemory) will be 128 MB or 25% of the total GPU memory (see ITextureFactory.AvailableVideoMemory, whichever is greater.

Public / Attributes

Cache​Memory


public attribute CacheMemory → (get,set)

value : int32

[>=0]
The maximum video memory amount, in MB.

The maximum amount of video memory to use for caching resource objects.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.