OmegaEngine API  1.0.3
Public Member Functions | Protected Member Functions | Properties | List of all members
OmegaEngine.Assets.Asset Class Reference

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

Inheritance diagram for OmegaEngine.Assets.Asset:
OmegaEngine.Assets.IReferenceCount NanoByte.Common.INamed< Asset > OmegaEngine.Assets.XMesh OmegaEngine.Assets.XSound OmegaEngine.Assets.XTexture OmegaEngine.Assets.XAnimatedMesh OmegaEngine.Assets.XOggSound OmegaEngine.Assets.XWaveSound

Public Member Functions

override string ToString ()
 
virtual void HoldReference ()
 Increments the ReferenceCount by one. More...
 
virtual void ReleaseReference ()
 Decrements the ReferenceCount by one. More...
 
void Dispose ()
 Disposes the internal DirectX resources of this asset. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 To be called by IDisposable.Dispose and the object destructor. More...
 

Properties

string Name [get, set]
 The filename More...
 
int ReferenceCount [get]
 How many Renderables use this asset More...
 
bool Disposed [get]
 Was this asset already disposed? More...
 
- Properties inherited from NanoByte.Common.INamed< Asset >
string Name
 

Detailed Description

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

See also
CacheManager.GetAsset<T>

Member Function Documentation

◆ Dispose() [1/2]

void OmegaEngine.Assets.Asset.Dispose ( )
inline

Disposes the internal DirectX resources of this asset.

Will be automatically called by CacheManager.Clean if ReferenceCount is zero.

◆ Dispose() [2/2]

virtual void OmegaEngine.Assets.Asset.Dispose ( bool  disposing)
inlineprotectedvirtual

To be called by IDisposable.Dispose and the object destructor.

Parameters
disposingtrue if called manually and not by the garbage collector.

Reimplemented in OmegaEngine.Assets.XMesh, OmegaEngine.Assets.XTexture, OmegaEngine.Assets.XAnimatedMesh, and OmegaEngine.Assets.XSound.

◆ HoldReference()

virtual void OmegaEngine.Assets.Asset.HoldReference ( )
inlinevirtual

Increments the ReferenceCount by one.

Implements OmegaEngine.Assets.IReferenceCount.

Reimplemented in OmegaEngine.Assets.XMesh.

◆ ReleaseReference()

virtual void OmegaEngine.Assets.Asset.ReleaseReference ( )
inlinevirtual

Decrements the ReferenceCount by one.

Implements OmegaEngine.Assets.IReferenceCount.

Reimplemented in OmegaEngine.Assets.XMesh.

Property Documentation

◆ Disposed

bool OmegaEngine.Assets.Asset.Disposed
get

Was this asset already disposed?

◆ Name

string OmegaEngine.Assets.Asset.Name
getset

The filename

◆ ReferenceCount

int OmegaEngine.Assets.Asset.ReferenceCount
get

How many Renderables use this asset

When this hits zero you can call Dispose()


The documentation for this class was generated from the following file: