Table of Contents

Class Asset

Namespace
OmegaEngine.Assets
Assembly
OmegaEngine.dll

Data loaded from a file and cached for use by one or more Renderables, Sounds, etc..

public abstract class Asset : IReferenceCount, IDisposable, INamed, IComparable<Asset>
Inheritance
Asset
Implements
Derived
Inherited Members
Extension Methods

Properties

Disposed

Was this asset already disposed?

[Browsable(false)]
public bool Disposed { get; }

Property Value

bool

Name

The filename

public string Name { get; set; }

Property Value

string

ReferenceCount

How many Renderables use this asset

[Browsable(false)]
public int ReferenceCount { get; }

Property Value

int

Remarks

When this hits zero you can call Dispose()

Methods

Dispose()

Disposes the internal DirectX resources of this asset.

public void Dispose()

Remarks

Will be automatically called by Clean() if ReferenceCount is zero.

Dispose(bool)

To be called by Dispose() and the object destructor.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true if called manually and not by the garbage collector.

~Asset()

protected ~Asset()

HoldReference()

Increments the ReferenceCount by one.

public virtual void HoldReference()

ReleaseReference()

Decrements the ReferenceCount by one.

public virtual void ReleaseReference()

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

See Also