+#ifndef SKYBOX_HPP
+#define SKYBOX_HPP
+
#include <string>
#include <vector>
#include <GL/glew.h>
#include <glm/glm.hpp>
#include "program.hpp"
+#include "image.hpp"
class Skybox {
public:
- Skybox(const std::vector<std::string> faces);
+ // img must be HDR
+ Skybox(const Image img);
void draw(glm::mat4 proj, glm::mat4 view) const;
+ GLuint getTexture() const { return cubemapTexId; }
+ GLuint getIrradianceMap() const { return irradianceTexId; }
+ GLuint getPrefilterMap() const { return prefilterTexId; }
+ GLuint getBRDFMap() const { return brdfMapTexId; }
private:
- GLuint texId, vao;
+ GLuint hdrTexId, cubemapTexId, irradianceTexId, prefilterTexId, brdfMapTexId;
+ GLuint captureFBO, captureRBO;
+ GLuint vao;
const Program program;
+ void generatePrefilterMap() const;
+ void generateBRDFMap() const;
};
+
+#endif