SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Skybox Class Reference

#include <Skybox.hpp>

Public Member Functions

 Skybox ()
 Default skybox: loads built-in sky panorama.
 Skybox (const std::array< std::string, 6 > &facePaths)
 Skybox (const std::string &panoramaPath)
 Construct skybox from a single equirectangular panorama image.
 Skybox (float topR, float topG, float topB, float midR, float midG, float midB, float botR, float botG, float botB)
 Construct skybox with procedural gradient (top, mid, bottom colors).
 ~Skybox ()
TextureGetCubemapTexture () const
void Initialize ()
 Create GPU resources (shader, buffers, cubemap texture).
bool IsInitialized () const
void Render ()
 Submit render commands for this frame.

Detailed Description

Renders the background sky as a cubemap, panorama, or procedural gradient.

Definition at line 19 of file Skybox.hpp.

Constructor & Destructor Documentation

◆ Skybox() [1/4]

Sleak::Skybox::Skybox ( const std::array< std::string, 6 > & facePaths)
explicit

Construct skybox from 6 cubemap face image paths Order: +X, -X, +Y, -Y, +Z, -Z

Definition at line 20 of file Skybox.cpp.

◆ Skybox() [2/4]

Sleak::Skybox::Skybox ( const std::string & panoramaPath)
explicit

Construct skybox from a single equirectangular panorama image.

Definition at line 23 of file Skybox.cpp.

◆ Skybox() [3/4]

Sleak::Skybox::Skybox ( float topR,
float topG,
float topB,
float midR,
float midG,
float midB,
float botR,
float botG,
float botB )

Construct skybox with procedural gradient (top, mid, bottom colors).

Definition at line 26 of file Skybox.cpp.

◆ Skybox() [4/4]

Sleak::Skybox::Skybox ( )

Default skybox: loads built-in sky panorama.

Definition at line 34 of file Skybox.cpp.

◆ ~Skybox()

Sleak::Skybox::~Skybox ( )

Definition at line 38 of file Skybox.cpp.

Member Function Documentation

◆ GetCubemapTexture()

Texture * Sleak::Skybox::GetCubemapTexture ( ) const
inline

Expose the underlying cubemap (used by IBL precompute). May be null if gradient mode or load failed.

Definition at line 48 of file Skybox.hpp.

◆ Initialize()

void Sleak::Skybox::Initialize ( )

Create GPU resources (shader, buffers, cubemap texture).

Definition at line 40 of file Skybox.cpp.

◆ IsInitialized()

bool Sleak::Skybox::IsInitialized ( ) const
inline

Definition at line 44 of file Skybox.hpp.

◆ Render()

void Sleak::Skybox::Render ( )

Submit render commands for this frame.

Definition at line 123 of file Skybox.cpp.