SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Skybox Class Reference

Public Member Functions

 Skybox (const std::vector< irr::video::IImage * > &skybox_textures)
 Generate a skybox from 6 2d textures.
 
void render (const irr::scene::ICameraSceneNode *camera) const
 
GLuint getSpecularProbe () const
 

Private Member Functions

void generateCubeMapFromTextures ()
 Generate an opengl cubemap texture from 6 2d textures.
 
void generateSpecularCubemap ()
 

Private Attributes

std::vector< irr::video::IImage * > m_skybox_textures
 The 6 skybox images.
 
GLuint m_cube_map
 The skybox texture id.
 
GLuint m_specular_probe
 The specular probe texture id.
 

Constructor & Destructor Documentation

◆ Skybox()

Skybox::Skybox ( const std::vector< irr::video::IImage * > &  skybox_textures)

Generate a skybox from 6 2d textures.

Out of legacy the sequence of textures maps to:

  • 1st texture maps to GL_TEXTURE_CUBE_MAP_POSITIVE_Y
  • 2nd texture maps to GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
  • 3rd texture maps to GL_TEXTURE_CUBE_MAP_POSITIVE_X
  • 4th texture maps to GL_TEXTURE_CUBE_MAP_NEGATIVE_X
  • 5th texture maps to GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
  • 6th texture maps to GL_TEXTURE_CUBE_MAP_POSITIVE_Z
    Parameters
    skybox_texturessequence of 6 textures.

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