SuperTuxKart
Loading...
Searching...
No Matches
skybox.hpp
1// SuperTuxKart - a fun racing game with go-kart
2// Copyright (C) 2015 SuperTuxKart-Team
3//
4// This program is free software; you can redistribute it and/or
5// modify it under the terms of the GNU General Public License
6// as published by the Free Software Foundation; either version 3
7// of the License, or (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18
19#ifndef HEADER_SKYBOX_HPP
20#define HEADER_SKYBOX_HPP
21
22#include "graphics/gl_headers.hpp"
23#include <vector>
24
25namespace irr
26{
27 namespace scene
28 {
29 class ISceneNode; class ICameraSceneNode;
30 }
31 namespace video
32 {
33 class IImage; class ITexture;
34 }
35}
36
37class Skybox
38{
39private:
41 std::vector<irr::video::IImage *> m_skybox_textures;
42
44 GLuint m_cube_map;
45
48
49
51 void generateSpecularCubemap ();
52
53public:
54 Skybox(const std::vector<irr::video::IImage *> &skybox_textures);
55 ~Skybox();
56
57 void render(const irr::scene::ICameraSceneNode *camera) const;
58
59 inline GLuint getSpecularProbe() const {return m_specular_probe; }
60
61
62};
63
64#endif //HEADER_SKYBOX_HPP
Definition: skybox.hpp:38
GLuint m_specular_probe
The specular probe texture id.
Definition: skybox.hpp:47
GLuint m_cube_map
The skybox texture id.
Definition: skybox.hpp:44
void generateCubeMapFromTextures()
Generate an opengl cubemap texture from 6 2d textures.
Definition: skybox.cpp:156
std::vector< irr::video::IImage * > m_skybox_textures
The 6 skybox images.
Definition: skybox.hpp:41