Diggler/src/Skybox.hpp

37 lines
644 B
C++
Raw Normal View History

2015-02-19 13:54:50 -08:00
#ifndef SKYBOX_HPP
#define SKYBOX_HPP
2016-07-02 06:51:36 -07:00
#include "platform/types/mat4.hpp"
2016-07-02 06:51:36 -07:00
#include "render/gl/VBO.hpp"
2015-02-19 13:54:50 -08:00
#include "Game.hpp"
namespace diggler {
2015-02-19 13:54:50 -08:00
namespace render {
namespace gl {
2015-02-19 13:54:50 -08:00
class Program;
}
}
2015-02-19 13:54:50 -08:00
class Texture;
class Skybox {
private:
static const render::gl::Program *RenderProgram;
2016-06-30 15:13:51 -07:00
static GLint RenderProgram_attrib_coord, RenderProgram_attrib_texcoord, RenderProgram_uni_mvp;
render::gl::VBO m_vbo;
2016-06-30 15:13:51 -07:00
Texture *m_top, *m_w, *m_e, *m_n, *m_s, *m_bottom;
Game *G;
struct Coord { int8 x, y, z, u, v; };
2015-02-19 13:54:50 -08:00
public:
2016-06-30 15:13:51 -07:00
Skybox(Game *G, const std::string &skyName);
~Skybox();
void render(const mat4 &transform) const;
2015-02-19 13:54:50 -08:00
};
}
2016-07-02 06:51:36 -07:00
#endif