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
Name
The filename
public string Name { get; set; }
Property Value
ReferenceCount
How many Renderables use this asset
[Browsable(false)]
public int ReferenceCount { get; }
Property Value
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
booltrue
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.