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

class TextureHandle in Tinman.AddOns.Rendering

Resource handle for texture objects.

abstract class TextureHandle implements IPreloadingResourceHandle

See also:

ITexture2D
ITextureCube

Public / Attributes

CanPreloadResource

Does this resource handle support preloading?

public virtual 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).
implements IPreloadingResourceHandle.CanPreloadResource

Public / Constructors

File2D

Creates a texture handle for the given file.

public static method File2D (Path path)
type TextureHandle
params path [not-null] The texture file path.
returns The ITexture2D handle.

FileCube

Creates a texture handle for the given file.

public static method FileCube (Path path)
type TextureHandle
params path [not-null] The texture file path.
returns The ITextureCube handle.

Public / Methods

CreateResource

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

[OwnerReturn]
public abstract method CreateResource (Graphics graphics)
type IResource
params graphics [not-null] The graphics context to use.
returns The resource object or null.
implements 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).

Equals

Compares this object with the given one.

[Pure]
public virtual 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.
implements IEquatable.Equals

GetHashCode

[Pure]
public override sealed method GetHashCode ()
type int32

PreloadResource

Preloads resource data, without creating the resource object.

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

Remarks:

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

Protected / Attributes

path

The texture file path.

protected readonly field path
type Path