40ed1a1b4c058e6ae13c41df0f58dc66ae84d79d
[opengl.git] / skybox.hpp
1 #ifndef SKYBOX_HPP
2 #define SKYBOX_HPP
3
4 #include <string>
5 #include <vector>
6 #include <GL/glew.h>
7 #include <glm/glm.hpp>
8 #include "program.hpp"
9 #include "image.hpp"
10 class Skybox {
11         public:
12                 // img must be HDR
13                 Skybox(const Image img);
14                 void draw(glm::mat4 proj, glm::mat4 view) const;
15                 GLuint getTexture() const { return cubemapTexId; }
16                 GLuint getIrradianceMap() const { return irradianceTexId; }
17         private:
18                 GLuint hdrTexId, cubemapTexId, irradianceTexId;
19                 GLuint vao;
20                 const Program program;
21 };
22
23 #endif