Class SimpleSkybox
- Namespace
- OmegaEngine.Graphics.Renderables
- Assembly
- OmegaEngine.dll
A cubic skybox existing of 4 or 6 non-animated planes.
public sealed class SimpleSkybox : Skybox, IDisposable
- Inheritance
-
objectSimpleSkybox
- Implements
- Inherited Members
Methods
FromAssetSet(Engine, string, string)
Creates a new skybox using a set of textures following a fixed naming convention.
public static SimpleSkybox FromAssetSet(Engine engine, string name, string format = "dds")
Parameters
engineEngineThe Engine providing the cache and rendering capabilities.
namestringThe base name of the skybox.
formatstringThe file format/ending of the texture files (e.g.,
ddsorjpg).
Returns
Remarks
Looks for textures named Skybox/name/rt|lf|up|dn|ft|bk.format.
Exceptions
- FileNotFoundException
One of the specified texture files could not be found.
- IOException
There was an error reading one of the texture files.
- UnauthorizedAccessException
Read access to one of the texture files is not permitted.
- InvalidDataException
One of the texture files does not contain a valid texture.
FromAssets(Engine, string, string, string?, string?, string, string)
Creates a new skybox using textures by file name.
public static SimpleSkybox FromAssets(Engine engine, string rt, string lf, string? up, string? dn, string ft, string bk)
Parameters
engineEngineThe Engine providing the cache and rendering capabilities.
rtstringThe ID of the "right" texture.
lfstringThe ID of the "left" texture
upstringThe ID of the "up" texture.
dnstringThe ID of the "down" texture.
ftstringThe ID of the "front" texture.
bkstringThe ID of the "back" texture.
Returns
- SimpleSkybox
The skybox that was created.
Exceptions
- FileNotFoundException
One of the specified texture files could not be found.
- IOException
There was an error reading one of the texture files.
- UnauthorizedAccessException
Read access to one of the texture files is not permitted.
- InvalidDataException
One of the texture files does not contain a valid texture.
OnDispose()
Hook that is called when the object needs to dispose its internal resources.
protected override void OnDispose()
OnEngineSet()
Hook that is called when Engine is set for the first time.
protected override void OnEngineSet()