Class SimpleSkybox
- Namespace
- OmegaEngine.Graphics.Renderables
- Assembly
- OmegaEngine.dll
A cubic skybox existing of 4 or 6 non-animated planes.
public class SimpleSkybox : Skybox, IDisposable
- Inheritance
-
SimpleSkybox
- Implements
- Inherited Members
- Extension Methods
Constructors
SimpleSkybox(XTexture[])
Creates a new skybox using texture-files
protected SimpleSkybox(XTexture[] textures)
Parameters
textures
XTexture[]An array of the 6 textures to be uses (right, left, top, bottom, front, back)
Exceptions
- ArgumentException
There are not exactly 6 textures.
Methods
FromAssets(Engine, string, string, string?, string?, string, string)
Creates a new skybox using a cached XTextures (loading new ones if they aren't cached).
public static SimpleSkybox FromAssets(Engine engine, string rt, string lf, string? up, string? dn, string ft, string bk)
Parameters
engine
EngineThe Engine providing the cache and rendering capabilities.
rt
stringThe ID of the "right" texture.
lf
stringThe ID of the "left" texture
up
stringThe ID of the "up" texture.
dn
stringThe ID of the "down" texture.
ft
stringThe ID of the "front" texture.
bk
stringThe 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()