Creating and using SkyBox objects from cubemapped textures. More...

Collaboration diagram for SkyBox:

Detailed Description

Creating and using SkyBox objects from cubemapped textures.

The SkyBox is a fairly simple class; it essentially just contains a GraphicsObject for the SkyBox cube. The SkyBox is can be created in IonEngine::LoadResources() by using the SkyBoxAssets manager. The SkyBoxAssets::Load() function takes in a storage key, a float scale for the SkyBox model, a Shader pointer, and a texture. The Shader pointer must be of type ShaderTexture to properly shade the GraphicsObject.

Here is an example of a SkyBoxAssets::Load() within IonEngine::LoadResources():

LoadResources.cpp:

{
...
//---------------------------------------------------------------------------------------------------------
// Load the SkyBoxes
//---------------------------------------------------------------------------------------------------------
SkyBoxAssets::Load("SkyBox_Cloudy", 5000, ShaderAssets::Get("SHADER_TEXTURE"), TextureAssets::Get("Tex_SkyBox"));
...
}

Each Scene also has a SkyBox associated with it. By default an empty 'NullSkyBox' object is assigned to the Scene. Adding a SkyBox is optional and will be applied through the Scene::SetSkyBox() function. This function takes in a string key which should be used by the SkyBoxAssets manager. Scene::SetSkyBox() can simply be applied to the scene within the Scene::Initialize().

UserScene.cpp:

void UserScene::Initialize()
{
SetSkyBox("SkyBox_Cloudy");
...
}

Classes

class  SkyBox
 The Skybox Object used with the SkyBoxAssets manager allows users to define a 3D textured cubemap to use as a skybox. More...
 
class  SkyBoxAssets
 System manager for for creating and accessing SkyBox objects from external resources. More...