TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface IPreloadingResourceHandle in Tinman.Engine.Rendering

Base interface for classes that act as handles for loading/creating graphics resources, with optional support for preloading resource data in a background thread.

interface IPreloadingResourceHandle extends IResourceHandle
  base of IModelTexture
  TextureHandle

Attributes

CanPreloadResource

Does this resource handle support preloading?

property CanPreloadResource { get }
type bool
value true if preloading is supported (i.e. PreloadResource will never return null),
false if preloading is not supported (i.e. PreloadResource always returns null).

Methods

CreateResource

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

[OwnerReturn]
method CreateResource (Graphics graphics)
type IResource
params graphics [not-null] The graphics context to use.
returns [not-null] The resource object.
inherited IResourceHandle.CreateResource

Remarks:

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).

Exceptions:

Equals

Compares this object with the given one.

[Pure]
method Equals (IResourceHandle other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
inherited IEquatable.Equals

PreloadResource

Preloads resource data, without creating the resource object.

[OwnerReturn, ThreadSafe]
method PreloadResource ()
type IResourceData
returns The preloaded resource data or null if this resource handle does not support resp. require preloading.

Remarks:

Calling CreateResource on the returned resource will perform no additional loading, which means that all necessary data is already present in memory.

Exceptions: