Add extra skyboxes
[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                 GLuint getPrefilterMap() const { return prefilterTexId; }
18                 GLuint getBRDFMap() const { return brdfMapTexId; }
19         private:
20                 GLuint hdrTexId, cubemapTexId, irradianceTexId, prefilterTexId, brdfMapTexId;
21                 GLuint captureFBO, captureRBO;
22                 GLuint vao;
23                 const Program program;
24                 void generatePrefilterMap() const;
25                 void generateBRDFMap() const;
26 };
27
28 #endif