SuzanneIsland: An island of Real-time rendering effects!
skybox_effect.h
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 #include <iostream>
6 
7 #include <GL/glew.h>
8 #include <GLFW/glfw3.h>
9 #include <glm/glm.hpp>
10 #include <glm/gtc/type_ptr.hpp>
11 #include <FreeImagePlus.h>
12 
13 #include "../shader.h"
14 
18 {
19 
20 private:
21 
22  GLuint skyboxVAO, skyboxVBO; // skybox cube geometry
23  GLuint cubeMap; // cubemap consisting of 6 texture faces that are sampled via a direction vector
24  Shader *skyboxShader = nullptr;
25 
26 public:
27 
28  SkyboxEffect(const std::vector<const GLchar *> &cubemapImgPaths);
29  ~SkyboxEffect();
30 
31  void drawSkybox(const glm::mat4 &viewMat, const glm::mat4 &projMat);
32 
33 private:
34 
43  GLuint loadCubemap(const std::vector<const GLchar *> &cubemapImgPaths);
44 
45 };
46 
Shader class.
Definition: shader.h:15
SkyboxEffect(const std::vector< const GLchar *> &cubemapImgPaths)
Definition: skybox_effect.cpp:50
SkyboxEffect This is used to draw a skybox using a cubemap texture.
Definition: skybox_effect.h:17