X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=skybox.hpp;h=40ed1a1b4c058e6ae13c41df0f58dc66ae84d79d;hp=759ce7a2f484886a8302c446252eb9c83f4f7de5;hb=9e43c799021b7bcca324b988aae44e98b05d10b4;hpb=8abaf8f77191e1c660def0832d8036a8b4639ba8 diff --git a/skybox.hpp b/skybox.hpp index 759ce7a..40ed1a1 100644 --- a/skybox.hpp +++ b/skybox.hpp @@ -6,13 +6,17 @@ #include #include #include "program.hpp" +#include "image.hpp" class Skybox { public: - Skybox(const std::vector faces); + // img must be HDR + Skybox(const Image img); void draw(glm::mat4 proj, glm::mat4 view) const; - GLuint getTexture() const; + GLuint getTexture() const { return cubemapTexId; } + GLuint getIrradianceMap() const { return irradianceTexId; } private: - GLuint texId, vao; + GLuint hdrTexId, cubemapTexId, irradianceTexId; + GLuint vao; const Program program; };