IResourceHandle

Description

[ShutdownSurvive]
interface Tinman.Engine.Rendering.IResourceHandle

Base interface for classes that act as handles for loading/creating graphics resources.

An implementation of IResourceHandle must provide a correct implementation for GetHashCode().

Public / Methods

Create​Resource


[OwnerReturn]
public method CreateResource → (1)

graphics in : Graphics

[not-null]
The graphics context to use.

returns → IResource

The resource object or null iff this resource handle explicitly represents a non-existent resource.

Creates a new resource object, using the given graphics context.

Resource objects may implement the IMemoryConsumption interface. In this case, the reported memory consumption will be interpreted as an estimate on how much GPU memory is consumed by the resource. This estimate can then be used for resource caching (e.g. CacheMemory).

RenderException

If a graphics subsystem error has occurred.

IOException

If an I/O error has occurred while reading the resource data.

ValidatingException

If the data reader has reported an error, for example because of an unsupported file format feature.